Jump to content

Terpo

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Terpo's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Well I did take a look and it seems, when changing the weather info in onItemRightClick everything is working fine. In onItemUse the same method block does not work. When creating a an entity in both methods and then trying to change the weather info in the entity class it will not work either. Edit: Holy ...... I solved my problem. And as always .... such a simple trick. I have a WeatherEntity, that is extended by AntiRain and Rain Entity. Turns out my WeahterEntity still had some code to turn on the rain and my AntiRain Entity was calling the super method. So it disabled the rain and then turned it on again. Heck... time for weekend
  2. Hello, I am hunting for a really weird behavior in my mod. There is an easy thing that needs to be achived: stop the rain. But some short information first: 1.14.4 with Forge 28.1.0 https://github.com/Terpo/Waterworks So basically, I created an item that should stop the rain. The easiest way in my opinion, was to copy the way the commands are working: WeatherCommand.class This shows how Minecraft is handling the command. time, per default is 6000 ticks. As you might expect the command is working. source.getWorld().getWorldInfo().setClearWeatherTime(time); source.getWorld().getWorldInfo().setRainTime(0); source.getWorld().getWorldInfo().setThunderTime(0); source.getWorld().getWorldInfo().setRaining(false); source.getWorld().getWorldInfo().setThundering(false); Now in my item class I do nearly the same: (even if I do not check for world.isRemote) @Override public ActionResultType onItemUse(ItemUseContext context) { final World world = context.getWorld(); if (!world.isRemote) { final WorldInfo worldInfo = world.getWorldInfo(); worldInfo.setClearWeatherTime(100000); worldInfo.setRainTime(0); worldInfo.setThunderTime(0); worldInfo.setRaining(false); worldInfo.setThundering(false); } return ActionResultType.SUCCESS; } The only difference is, that my item does not change the weather. Even more interesting is, that if the weather is clear and the item is used, it starts raining. If I am doing the same on a block like: @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockRayTraceResult facing) { final World world = worldIn; final WorldInfo worldInfo = world.getWorldInfo(); worldInfo.setClearWeatherTime(100000); worldInfo.setRainTime(0); worldInfo.setThunderTime(0); worldInfo.setRaining(false); worldInfo.setThundering(false); ... } It is working again. Currently I am simply out of ideas. Has anyone an idea how or why this is broken with an item?
  3. So, I tried to find it but no chance so far. Maybe the tutorials were right, but the Factory stuff around the registering was confusing me. There are not many tutorials for entities in 1.11.2 so far. And straight copy of 1.10 / 1.9.4 tuts will result in a deprecated registration. My main source was the wiki of McJty: http://wiki.mcjty.eu/modding/index.php/Mobs-1.9 But as far as I can see its correct there.
  4. Because I can.... fail. I think that I copied that part from a tutorial or something and did not check all parameters for the function. Now its working.
  5. Oki: main Mod file: https://github.com/Terpo/Waterworks/blob/master/src/main/java/org/terpo/waterworks/Waterworks.java registers entities with InitEntities.init(); (works as commonProxy here) This is my InitEntities class: https://github.com/Terpo/Waterworks/blob/master/src/main/java/org/terpo/waterworks/init/InitEntities.java This is the client render register stuff: https://github.com/Terpo/Waterworks/blob/master/src/main/java/org/terpo/waterworks/proxy/ClientProxy.java I pushed my latest updates to the repo.
  6. Hello, it seems that I need some help for my new firework rocket. The idea is, to create a rocket that simply starts rain when it dies. The code works for the serverside of life but the rocket is not rendering on clientside Interesting enough is, that the minecraft rocket entity is created twice. The first time through onItemUse() in ItemFirework.class and then a second time in the class NetHandlerPlayClient. The whole class is client sided and public void handleSpawnObject(SPacketSpawnObject packetIn) is called. There we have: else if (packetIn.getType() == 76) { entity = new EntityFireworkRocket(this.clientWorldController, d0, d1, d2, ItemStack.EMPTY); } For my rocket, the whole NetHandlerPlayClient class isn't even called. And for this, my rocket does not render ingame. All I can notice is the starting sound of the rocket and my rain effect that is created on serverside when isDead() is called. After hours of research I'm simply out of ideas at this point.
  7. 1. Fill your Inventory with random scrap, inventory must be full 2. Throw out some of the items in the inventory 3. Refill your inventory with new random scrap that does not stack with the items on the ground (it is equal wether the inventory is full or not... just more items are on the ground than you can pick up) 4. Pick up the items on the ground and get, hopefully, the sound loop - Terpo -
  8. Hi, I tried a bit the new forge version with forestry and after a few seconds I get a soundbug / sound loop. First, to make sure it belongs to Forge, I tried it with a vanilla 1.3.2 MC and one time without forestry. This bug/loop only happens when Forge#199 is installed. ForgeModLoader-client-0.log , but there is nothing what shows up the bug I think. Using: MultiMC Build 45 Youtube Bug Video: Tested a few times, and is repeatable. I hope that I did not forget anything important - Terpo -
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.