Skip to content

Commit

Permalink
rc3 - 主要是添加创建Danmaku支持与发布maven
Browse files Browse the repository at this point in the history
  • Loading branch information
H2Sxxa committed Jul 23, 2023
1 parent 4a8d3ab commit 7edbb67
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.daemon=false
systemProp.file.encoding=UTF-8

# Mod Information
mod_version = 1.0
mod_version = 1.0-rc3
maven_group = io.github.teamgensouspark.kekkai
archives_base_name = kekkai

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import net.katsstuff.teamnightclipse.danmakucore.danmaku.DanmakuTemplate.Builder;
import net.minecraft.entity.EntityLivingBase;

public class DanmakuHelper {
public static Builder get_builder() {
public class DanmakuBuilder {
public static Builder getBuilder() {
return DanmakuTemplate.builder();
}

public static Builder get_builder_e(EntityLivingBase entity) {
public static Builder getBuilderWithEntity(EntityLivingBase entity) {
return DanmakuTemplate.builder().setUser(entity).setWorld(entity.world);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package io.github.teamgensouspark.kekkai.danmaku;

import net.katsstuff.teamnightclipse.danmakucore.client.helper.DanCoreRenderHelper;
import net.katsstuff.teamnightclipse.danmakucore.danmaku.DanmakuState;
import net.katsstuff.teamnightclipse.danmakucore.danmaku.form.IRenderForm;
import net.katsstuff.teamnightclipse.danmakucore.danmaku.form.RenderingProperty;
import net.katsstuff.teamnightclipse.danmakucore.impl.form.FormGeneric;
import net.katsstuff.teamnightclipse.mirror.client.shaders.MirrorShaderProgram;
import net.katsstuff.teamnightclipse.mirror.data.Quat;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import scala.collection.immutable.Map;
import scala.collection.immutable.Map$;

public class DanmakuFormBase extends FormGeneric {
public DanmakuFormBase(String name){
super(name);
}

@Override
@SideOnly(Side.CLIENT)
public IRenderForm createRenderer() {
return new IRenderForm() {

@Override
public void renderLegacy(DanmakuState danmaku, double x, double y, double z, Quat orientation,
float partialTicks, RenderManager manager) {
}

@Override
public void renderShaders(DanmakuState danmaku, double x, double y, double z, Quat orientation,
float partialTicks, RenderManager manager, MirrorShaderProgram shaderProgram) {
}

@Override
public Map<String, RenderingProperty> defaultAttributeValues() {
return Map$.MODULE$.empty();
}

@Override
public ResourceLocation shader(DanmakuState state) {
return DanCoreRenderHelper.baseDanmakuShaderLoc();
}

};
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.github.teamgensouspark.kekkai.danmaku;

import net.katsstuff.teamnightclipse.danmakucore.danmaku.DanmakuState;
import net.katsstuff.teamnightclipse.danmakucore.danmaku.DanmakuUpdate;
import net.katsstuff.teamnightclipse.danmakucore.impl.subentity.SubEntityDefault;

public class DanmakuSubEntityBase extends SubEntityDefault{
@Override
public DanmakuUpdate subEntityTick(DanmakuState state) {
return state.update();
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.github.teamgensouspark.kekkai.danmaku;

import net.katsstuff.teamnightclipse.danmakucore.danmaku.subentity.SubEntity;
import net.katsstuff.teamnightclipse.danmakucore.danmaku.subentity.SubEntityType;

public class DanmakuSubEntityTypeBase extends SubEntityType{

@Override
public SubEntity instantiate() {
return new DanmakuSubEntityBase();
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.teamgensouspark.kekkai.example;


import io.github.teamgensouspark.kekkai.danmaku.DanmakuHelper;
import io.github.teamgensouspark.kekkai.danmaku.DanmakuBuilder;
import net.katsstuff.teamnightclipse.danmakucore.entity.spellcard.EntitySpellcard;
import net.katsstuff.teamnightclipse.danmakucore.entity.spellcard.Spellcard;
import net.katsstuff.teamnightclipse.danmakucore.entity.spellcard.SpellcardEntity;
Expand All @@ -21,7 +21,7 @@ public MySpellCardEntity(Spellcard spellcard, EntitySpellcard cardEntity, Option
public void onSpellcardUpdate() {
DanmakuCreationHelper.createWideShot(
Quat.orientationOf(this.user()),
DanmakuHelper.get_builder_e(this.user())
DanmakuBuilder.getBuilderWithEntity(this.user())
.setShot(LibShotData.SHOT_CIRCLE.setSize(1.5F))
.build(),
2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import net.minecraft.entity.EntityLivingBase;
import scala.Option;

public abstract class SpellCardBase<T extends SpellcardEntity> extends Spellcard{
public class SpellCardBase<T extends SpellcardEntity> extends Spellcard{
int level = 1;
int removeTime = 50;
int endTime = 50;
Expand Down Expand Up @@ -74,4 +74,9 @@ public Spellcard setendTime(int endTime){
public TouhouCharacter touhouUser() {
return this.character;
}

public Spellcard setTouhouUser(TouhouCharacter character){
this.character= character;
return this;
}
}

0 comments on commit 7edbb67

Please sign in to comment.