fix #74
This commit is contained in:
parent
7eea96ec60
commit
a011ce5a5d
4 changed files with 40 additions and 5 deletions
|
@ -126,6 +126,6 @@ public class ConjureParticle extends TextureSheetParticle {
|
|||
}
|
||||
}
|
||||
|
||||
private static final ConjureRenderType CONJURE_RENDER_TYPE = new ConjureRenderType(false);
|
||||
private static final ConjureRenderType LIGHT_RENDER_TYPE = new ConjureRenderType(true);
|
||||
public static final ConjureRenderType CONJURE_RENDER_TYPE = new ConjureRenderType(false);
|
||||
public static final ConjureRenderType LIGHT_RENDER_TYPE = new ConjureRenderType(true);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package at.petrak.hexcasting.common.items.magic;
|
||||
|
||||
import at.petrak.hexcasting.api.item.ManaHolderItem;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.advancements.Advancement;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
|
@ -82,8 +83,8 @@ public class ItemCreativeUnlocker extends Item implements ManaHolderItem {
|
|||
@Override
|
||||
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> tooltipComponents,
|
||||
TooltipFlag isAdvanced) {
|
||||
tooltipComponents.add(new TranslatableComponent("item.hexcasting.creative_unlocker.tooltip.0"));
|
||||
tooltipComponents.add(new TranslatableComponent("item.hexcasting.creative_unlocker.tooltip.1"));
|
||||
tooltipComponents.add(new TranslatableComponent("item.hexcasting.creative_unlocker.tooltip.0").withStyle(ChatFormatting.GRAY));
|
||||
tooltipComponents.add(new TranslatableComponent("item.hexcasting.creative_unlocker.tooltip.1").withStyle(ChatFormatting.GRAY));
|
||||
}
|
||||
|
||||
private static void addChildren(Advancement root, List<Advancement> out) {
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package at.petrak.hexcasting.fabric.mixin.client;
|
||||
|
||||
import at.petrak.hexcasting.client.particles.ConjureParticle;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.client.particle.ParticleEngine;
|
||||
import net.minecraft.client.particle.ParticleRenderType;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mixin(ParticleEngine.class)
|
||||
public class FabricParticleEngineMixin {
|
||||
@Mutable
|
||||
@Final
|
||||
@Shadow
|
||||
private static List<ParticleRenderType> RENDER_ORDER;
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "<clinit>")
|
||||
private static void addTypes(CallbackInfo ci) {
|
||||
RENDER_ORDER = ImmutableList.<ParticleRenderType>builder().addAll(RENDER_ORDER)
|
||||
.add(ConjureParticle.CONJURE_RENDER_TYPE, ConjureParticle.LIGHT_RENDER_TYPE)
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -11,5 +11,9 @@
|
|||
"FabricItemEntityMixin",
|
||||
"FabricVillagerTurnIntoWitchMixin"
|
||||
],
|
||||
"client": ["client.FabricAbstractTextureMixin", "client.FabricMouseHandlerMixin"]
|
||||
"client": [
|
||||
"client.FabricAbstractTextureMixin",
|
||||
"client.FabricMouseHandlerMixin",
|
||||
"client.FabricParticleEngineMixin"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue