• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I'm having a hard time understanding capabilities as there seems to be a few ways of adding them making it really confusing to me. I also seem to be missing something when adding a capability to an ItemStack. Could someone nudge me in the right direction? I've tried looking at the Forge Docs and Github code and nothing seems to help.   package com.event_horizon.capabilities; public interface IFission { public float getDuration(); public float getTemperature(); public void addNeutrons(final long neutrons); public long getNeutrons(); } package com.event_horizon.capabilities; import net.minecraft.nbt.CompoundNBT; import net.minecraftforge.common.util.INBTSerializable; public class Fission implements IFission, INBTSerializable<CompoundNBT> { private static final float duration = 0.0001f; private float temperature = 293; private long neutrons = 0; @Override public float getDuration() { return duration; } @Override public float getTemperature() { return temperature; } @Override public void addNeutrons(long neutrons) { this.neutrons += neutrons; } @Override public long getNeutrons() { return neutrons; } @Override public CompoundNBT serializeNBT() { CompoundNBT nbt = new CompoundNBT(); nbt.putFloat("temperature", temperature); nbt.putLong("neutrons", neutrons); return nbt; } @Override public void deserializeNBT(CompoundNBT nbt) { temperature = nbt.getFloat("temperature"); neutrons = nbt.getLong("neutrons"); } } package com.event_horizon.events; import com.event_horizon.EventHorizon; import com.event_horizon.capabilities.FissionProvider; import com.event_horizon.items.FuelRod; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.event.AttachCapabilitiesEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; @Mod.EventBusSubscriber(modid = EventHorizon.MOD_ID, bus = Bus.FORGE) public class CapabilitiesEvent { public static final ResourceLocation FISSION = new ResourceLocation(EventHorizon.MOD_ID, "fission"); @SubscribeEvent public static void itemStackCapabilities(AttachCapabilitiesEvent<ItemStack> event) { Item item = event.getObject().getItem(); if (item instanceof FuelRod) { event.addCapability(FISSION, new Fission()); } } }  
    • So blah blah blah I'm doing custom armor models, the models are done in Tabula and then manually edited so it works for this version. Anyways the model and textures all look good and the texture offsets are set correctly, as can be seen here:     And then in my model class everything is parented correctly, and renders. However, I noticed that there are random texture artifacts for some reason in-game. This happens on every armor piece, this one is without the chestplate:     I thought it might be some kind of texture offset problem so I tried making the texture size bigger and more spread out, but it still happens. What could be causing this?  
  • Topics

  • Who's Online (See full list)