• Recently Browsing

    No registered users viewing this page.

  • Posts

    • For the repeater i have got a little problem:   I can set the particle position by direction.   But using the BlockState DELAY for moving the particle position with the torch does not work.   My code for this: package drachenbauer32.yellowredstonemod.blocks; import java.util.Random; import drachenbauer32.yellowredstonemod.util.Reference; import net.minecraft.block.BlockState; import net.minecraft.block.RepeaterBlock; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class YellowRepeaterBlock extends RepeaterBlock { private double ParticleX_1; private double ParticleX_2; private double ParticleZ_1; private double ParticleZ_2; public YellowRepeaterBlock(Properties properties) { super(properties); } @Override public int getLightValue(BlockState state) { if(state.get(POWERED)) { return 15; } else { return 0; } } private void setParticlePositions(BlockState state) { double dalaySetting = state.get(DELAY) / 8; if (state.get(HORIZONTAL_FACING) == Direction.NORTH) { ParticleX_1 = 0.5; ParticleX_2 = 0.5; ParticleZ_1 = 0.8125; ParticleZ_2 = 0.6875 - dalaySetting; } else if (state.get(HORIZONTAL_FACING) == Direction.EAST) { ParticleX_1 = 0.1875; ParticleX_2 = 0.3125 + dalaySetting; ParticleZ_1 = 0.5; ParticleZ_2 = 0.5; } else if (state.get(HORIZONTAL_FACING) == Direction.SOUTH) { ParticleX_1 = 0.5; ParticleX_2 = 0.5; ParticleZ_1 = 0.1875; ParticleZ_2 = 0.3125 + dalaySetting; } else if (state.get(HORIZONTAL_FACING) == Direction.WEST) { ParticleX_1 = 0.8125; ParticleX_2 = 0.6875 - dalaySetting; ParticleZ_1 = 0.5; ParticleZ_2 = 0.5; } } @Override public void animateTick(BlockState state, World world, BlockPos pos, Random rand) { setParticlePositions(state); if (state.get(POWERED)) { double d0 = (double)pos.getX() + ParticleX_1 + (rand.nextDouble() - 0.5D) * 0.2D; double d1 = (double)pos.getY() + 0.375 + (rand.nextDouble() - 0.5D) * 0.2D; double d2 = (double)pos.getZ() + ParticleZ_1 + (rand.nextDouble() - 0.5D) * 0.2D; world.addParticle(Reference.REDSTONE_DUST, d0, d1, d2, 0.0D, 0.0D, 0.0D); if (!(state.get(LOCKED))) { double d3 = (double)pos.getX() + ParticleX_2 + (rand.nextDouble() - 0.5D) * 0.2D; double d4 = (double)pos.getY() + 0.375 + (rand.nextDouble() - 0.5D) * 0.2D; double d5 = (double)pos.getZ() + ParticleZ_2 + (rand.nextDouble() - 0.5D) * 0.2D; world.addParticle(Reference.REDSTONE_DUST, d3, d4, d5, 0.0D, 0.0D, 0.0D); } } } }  
    • i am trying to make my own machine but when trying to open the gui it crashes the game. crash report: block class: container class: gui class: Tile entity class: gui handeler class: tile entity handeler class: any idea what i did wrong? feel free to let me know if i forgot to add something.
    • Hi guys!    I'm having problems to attach new event handlers...   I created the following class:   @Mod.EventBusSubscriber public class CubicCityEventHandlers {     @SubscribeEvent     public static void onRoadPopulated(RoadPopulateEvent event) {         // Event here with a breakpoint     } }   public class RoadPopulateEvent extends Event {     public CubePos cubePos;     private RoadPopulateEvent() {}     public RoadPopulateEvent(CubePos cubePos) {         this.cubePos = cubePos;     } }   And I call it like this:   MinecraftForge.EVENT_BUS.post(new RoadPopulateEvent(new CubePos(cubeX, cubeY, cubeZ)));   I checked if the post method is executed, and it's executed.   But I don't know why the callback (onRoadPopulated) isn't called.   What should I check next?   Thanks.
    • Whenever I try to download forge the download pauses and it gets stuck on "unpacking packed file akka-actor_2.11-2.3.3.jar.pack.xz" is there any way I can fix this?
    • Show your launcher installation settings screen, and the contents of the mods folder please
  • Topics

  • Who's Online (See full list)