Skip to content

Commit

Permalink
Test Test
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Dec 16, 2024
1 parent 0d4ed07 commit ac5ab2e
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion blockbench/malignant_lead_test.bbmodel

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ neoForge {
}

accessTransformers.from(
project.files("src/main/resources/META-INF/accesstransformer.cfg", "src/main/resources/META-INF/recipebuilders.cfg", "src/main/resources/META-INF/blockproperties.cfg")
project.files(
"src/main/resources/META-INF/accesstransformer.cfg",
"src/main/resources/META-INF/recipebuilders.cfg",
"src/main/resources/META-INF/blockproperties.cfg",
"src/main/resources/META-INF/renderstates.cfg"
)
)

runs {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mod_authors=Sammy Semicolon
mod_description=A dark magic mod focused on soul and spirit magic.

# Mandatory
lodestone_version=1.7.0.118
lodestone_version=1.7.0.121
curios_version=9.0.15+1.21.1

# Iron's Spellbooks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void render(SoulwovenBannerBlockEntity blockEntityIn, float partialTicks,
return;
}
var token = RenderTypeToken.createCachedToken(block.texture);
var banner = LodestoneRenderTypes.TRANSPARENT_TEXTURE.applyAndCache(token);
var banner = LodestoneRenderTypes.CUTOUT_TEXTURE.applyAndCache(token);
var builder = VFXBuilders.createWorld().setRenderType(banner).setLight(combinedLightIn);
var pos = blockEntityIn.getBlockPos();
var spirit = blockEntityIn.spirit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ public void tick() {
}

public void craft() {
ItemStack stack = inventory.getStackInSlot(0);
ItemStack outputStack = recipe.output.copy();
Vec3 itemPos = getItemPos();
var stack = inventory.getStackInSlot(0);
var outputStack = recipe.output.copy();
var itemPos = getItemPos();
final RandomSource random = level.random;
float processingSpeed = acceleratorData.focusingSpeed.getValue(acceleratorData);
float damageChance = acceleratorData.damageChance.getValue(acceleratorData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ else if (held.canPerformAction(ItemAbilities.AXE_STRIP)) {
}
}
if (success) {
ParticleEffectTypeRegistry.TOTEM_POLE_ACTIVATED.createPositionedEffect((ServerLevel) level, new PositionEffectData(worldPosition), new ColorEffectData(spirit));
if (spirit != null) {
ParticleEffectTypeRegistry.TOTEM_POLE_ACTIVATED.createPositionedEffect((ServerLevel) level, new PositionEffectData(worldPosition), new ColorEffectData(spirit));
}
level.playSound(null, worldPosition, SoundRegistry.TOTEM_ENGRAVE.get(), SoundSource.BLOCKS, 1, Mth.nextFloat(level.random, 0.9f, 1.1f));
if (isSoulwood) {
level.playSound(null, worldPosition, SoundRegistry.MAJOR_BLIGHT_MOTIF.get(), SoundSource.BLOCKS, 1, 1);
Expand Down Expand Up @@ -117,7 +119,7 @@ protected void loadAdditional(CompoundTag tag, HolderLookup.Provider pRegistries
@Override
public void init() {
super.init();
if (level.getBlockEntity(new BlockPos(getBlockPos().getX(), totemBaseYLevel, getBlockPos().getZ())) instanceof TotemBaseBlockEntity totemBaseBlockEntity) {
if (level.getBlockEntity(getBlockPos().mutable().setY(totemBaseYLevel)) instanceof TotemBaseBlockEntity totemBaseBlockEntity) {
totemBase = totemBaseBlockEntity;
}
}
Expand All @@ -141,18 +143,18 @@ public void tick() {
public void setSpirit(MalumSpiritType type) {
level.playSound(null, worldPosition, SoundRegistry.TOTEM_ENGRAVE.get(), SoundSource.BLOCKS, 1, Mth.nextFloat(level.random, 0.9f, 1.1f));
level.playSound(null, worldPosition, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1, Mth.nextFloat(level.random, 0.9f, 1.1f));
ParticleEffectTypeRegistry.TOTEM_POLE_ACTIVATED.createPositionedEffect((ServerLevel) level, new PositionEffectData(worldPosition), new ColorEffectData(spirit));
this.spirit = type;
this.chargeProgress = 10;
ParticleEffectTypeRegistry.TOTEM_POLE_ACTIVATED.createPositionedEffect((ServerLevel) level, new PositionEffectData(worldPosition), new ColorEffectData(spirit));
BlockStateHelper.updateState(level, worldPosition);
}

public void riteStarting(TotemBaseBlockEntity totemBase, int height) {
level.playSound(null, worldPosition, SoundRegistry.TOTEM_CHARGE.get(), SoundSource.BLOCKS, 1, 0.9f + 0.2f * height);
ParticleEffectTypeRegistry.TOTEM_POLE_ACTIVATED.createPositionedEffect((ServerLevel) level, new PositionEffectData(worldPosition), new ColorEffectData(spirit));
this.totemBaseYLevel = worldPosition.getY() - height;
this.totemBase = totemBase;
this.totemPoleState = TotemPoleState.CHARGING;
ParticleEffectTypeRegistry.TOTEM_POLE_ACTIVATED.createPositionedEffect((ServerLevel) level, new PositionEffectData(worldPosition), new ColorEffectData(spirit));
BlockStateHelper.updateState(level, worldPosition);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ protected static void buildRecipes(RecipeOutput output) {

//BANNERS
shaped(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER.get()).define('X', ItemTagRegistry.RUNEWOOD_PLANKS).define('Y', ItemRegistry.SOULWOVEN_SILK.get()).pattern("X").pattern("Y").pattern("Y").unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output);
shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_HORNS.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(ItemRegistry.GRIM_TALC.get()).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output);
shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_SIGIL.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(ItemRegistry.SOUL_STAINED_STEEL_PLATING.get()).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output);
shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_BREEZE.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(Items.WIND_CHARGE).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output);
shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_FRACTAL.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(Tags.Items.GEMS_EMERALD).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output);

//SPIRIT METALS
shaped(RecipeCategory.MISC, ItemRegistry.BLOCK_OF_SOUL_STAINED_STEEL.get()).define('#', ItemRegistry.SOUL_STAINED_STEEL_INGOT.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_soul_stained_steel", has(ItemRegistry.SOUL_STAINED_STEEL_INGOT.get())).save(output);
shaped(RecipeCategory.MISC, ItemRegistry.SOUL_STAINED_STEEL_INGOT.get()).define('#', ItemRegistry.SOUL_STAINED_STEEL_NUGGET.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_soul_stained_steel", has(ItemRegistry.SOUL_STAINED_STEEL_INGOT.get())).save(output, malumPath("soul_stained_steel_from_nuggets"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public static LodestoneBlockProperties RUNIC_SAP() {
public static LodestoneBlockProperties SOULWOVEN_BANNER() {
return RUNEWOOD()
.noOcclusion()
.noCollission()
.setCutoutRenderType();
}

Expand Down
22 changes: 0 additions & 22 deletions src/main/resources/META-INF/accesstransformer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ public net.minecraft.client.Minecraft timer

public net.minecraft.client.particle.ParticleEngine spriteSets

public net.minecraft.client.renderer.RenderType$CompositeRenderType

public net.minecraft.client.renderer.RenderType$CompositeRenderType state

public net.minecraft.client.renderer.RenderStateShard$ShaderStateShard shader

public net.minecraft.client.renderer.RenderType$CompositeState shaderState

public net.minecraft.client.renderer.RenderType$CompositeState transparencyState

public net.minecraft.client.renderer.RenderType$CompositeState textureState

public net.minecraft.client.renderer.RenderStateShard$EmptyTextureStateShard cutoutTexture()Ljava/util/Optional;

public net.minecraft.client.renderer.RenderStateShard$TextureStateShard cutoutTexture()Ljava/util/Optional;

public net.minecraft.client.renderer.RenderStateShard$MultiTextureStateShard cutoutTexture()Ljava/util/Optional;

public net.minecraft.client.renderer.ShaderInstance parseUniformNode(Lcom/google/gson/JsonElement;)V

public net.minecraft.client.renderer.ShaderInstance uniforms
Expand Down Expand Up @@ -150,10 +132,6 @@ public net.minecraft.client.gui.Font adjustColor(I)I

public net.minecraft.client.gui.Font SHADOW_OFFSET

public net.minecraft.client.renderer.RenderType$CompositeState$CompositeStateBuilder <init>()V

public net.minecraft.client.renderer.RenderType$CompositeState$CompositeStateBuilder <init>()V # CompositeStateBuilder

public net.minecraft.world.entity.animal.allay.Allay duplicationCooldown # duplicationCooldown

public net.minecraft.core.HolderSet$Named contents # contents
Expand Down
17 changes: 17 additions & 0 deletions src/main/resources/META-INF/renderstates.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
public net.minecraft.client.renderer.RenderType$CompositeRenderType
public net.minecraft.client.renderer.RenderType$CompositeRenderType state # state
public net.minecraft.client.renderer.RenderType$CompositeRenderType state()Lnet/minecraft/client/renderer/RenderType$CompositeState; # state
public net.minecraft.client.renderer.RenderType$CompositeRenderType OUTLINE # OUTLINE
public net.minecraft.client.renderer.RenderType$CompositeState states # states
public net.minecraft.client.renderer.RenderType$CompositeState outlineProperty # outlineProperty
public net.minecraft.client.renderer.RenderType$CompositeState textureState # textureState
public net.minecraft.client.renderer.RenderType$CompositeState cullState # cullState
public net.minecraft.client.renderer.RenderType$CompositeState shaderState # shaderState
public net.minecraft.client.renderer.RenderType$CompositeState transparencyState # transparencyState
public net.minecraft.client.renderer.RenderType$CompositeState lightmapState # lightmapState
public net.minecraft.client.renderer.RenderType$CompositeState$CompositeStateBuilder <init>()V
public net.minecraft.client.renderer.RenderType$CompositeState$CompositeStateBuilder <init>()V # CompositeStateBuilder
public net.minecraft.client.renderer.RenderStateShard$ShaderStateShard shader # shader
public net.minecraft.client.renderer.RenderStateShard$EmptyTextureStateShard cutoutTexture()Ljava/util/Optional; # cutoutTexture
public net.minecraft.client.renderer.RenderStateShard$TextureStateShard cutoutTexture()Ljava/util/Optional; # cutoutTexture
public net.minecraft.client.renderer.RenderStateShard$MultiTextureStateShard cutoutTexture()Ljava/util/Optional; # cutoutTexture
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ac5ab2e

Please sign in to comment.