-
Posts
107 -
Joined
-
Last visited
Everything posted by tebreca
-
hello everybody, i just updated my java and setup my new eclipse but my commandpromt gives me this: PS C:\Users\ewanm\OneDrive\Documenten\Nieuwe map\Eagles-Essentials> .\gradlew.bat setupDecompWorkspace FAILURE: Build failed with an exception. * What went wrong: Could not determine java version from '9.0.1'. are this my environment variables or does gradle not support java 1.9? this are the vars for PATH this is the error i get while running it with stacktrace arguments: java.lang.IllegalArgumentException: Could not determine java version from '9.0.1'. at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:68) at org.gradle.api.JavaVersion.current(JavaVersion.java:78) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:32) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
-
[1.12.2]Harvester crashes world when setting a crops age to 0
tebreca replied to tebreca's topic in Modder Support
ok thx ok, im sorry for not looking up the files before posting here -
So i got this error net.minecraft.util.ReportedException: Ticking block entity at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:846) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) ~[IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_131] Caused by: java.lang.IllegalArgumentException: Cannot set property PropertyInteger{name=age, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7]} as it does not exist in BlockStateContainer{block=minecraft:beetroots, properties=[age]} at net.minecraft.block.state.BlockStateContainer$StateImplementation.withProperty(BlockStateContainer.java:221) ~[BlockStateContainer$StateImplementation.class:?] at btf.objects.blocks.tiles.TileHarvesterTicker.update(TileHarvesterTicker.java:61) ~[TileHarvesterTicker.class:?] at net.minecraft.world.World.updateEntities(World.java:1988) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:642) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:840) ~[MinecraftServer.class:?] ... 4 more this is the TE''s code package btf.objects.blocks.tiles; import btf.main.Main; import btf.objects.blocks.Machine; import jline.console.completer.ArgumentCompleter.WhitespaceArgumentDelimiter; import net.minecraft.block.BlockChest; import net.minecraft.block.BlockCrops; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; public class TileHarvesterTicker extends TileEntity implements ITickable{ BlockPos checkstart = null; IBlockState statebehind = null; BlockPos behind = null; boolean initialized = false; private int x = 0; private int y = 0; private int z = 0; @Override public void update() { if(!initialized) { init(); } if (x == 3) { x=0;z++; }else if (z == 4) { z=0;x=0; } IBlockState state = world.getBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z)); if (state.getBlock() == Blocks.WHEAT) { if (state == Blocks.WHEAT.getBlockState().getBaseState().withProperty(net.minecraft.block.BlockCrops.AGE, 7)) { world.setBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z), state.withProperty(BlockCrops.AGE, 0)); EntityItem item = new EntityItem(world, behind.getX(), behind.getY(), behind.getZ(), new ItemStack(Items.WHEAT)); if (!world.isRemote) { world.spawnEntity(item); }} } else if (state.getBlock() == Blocks.CARROTS) { if (state == Blocks.CARROTS.getBlockState().getBaseState().withProperty(net.minecraft.block.BlockCrops.AGE, 7)) { world.setBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z), state.withProperty(BlockCrops.AGE, 0)); EntityItem item = new EntityItem(world, behind.getX(), behind.getY(), behind.getZ(), new ItemStack(Items.CARROT, (int) (Math.random() * Math.random() * 2 +1))); if (!world.isRemote) { world.spawnEntity(item); }} } else if (state.getBlock() == Blocks.POTATOES) { if (state == Blocks.POTATOES.getBlockState().getBaseState().withProperty(net.minecraft.block.BlockCrops.AGE, 7)) { world.setBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z), state.withProperty(BlockCrops.AGE, 0)); EntityItem item = new EntityItem(world, behind.getX(), behind.getY(), behind.getZ(), new ItemStack(Items.CARROT, (int) (Math.random() * Math.random() * 2 +1))); if (!world.isRemote) { world.spawnEntity(item); }} } else if (state.getBlock() == Blocks.BEETROOTS) { if (state == Blocks.BEETROOTS.getBlockState().getBaseState().withProperty(net.minecraft.block.BlockCrops.AGE, 3)) { world.setBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z), state.withProperty(BlockCrops.AGE, 0)); EntityItem item = new EntityItem(world, behind.getX(), behind.getY(), behind.getZ(), new ItemStack(Items.CARROT, (int) (Math.random() * Math.random() * 2 +1))); if (!world.isRemote) { world.spawnEntity(item); }} } x++; } private void init() { initialized = true; switch (world.getBlockState(pos).getValue(Machine.FACING)) { case DOWN: { break; } case EAST: { checkstart = new BlockPos(pos.getX()+1, pos.getY(), pos.getZ()-1); break; } case NORTH: { checkstart = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ()-3); break; } case SOUTH: { checkstart = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ()+1); break; } case UP: { } case WEST: { checkstart = new BlockPos(pos.getX()-3, pos.getY(), pos.getZ()-1); break; } } switch (world.getBlockState(pos).getValue(Machine.FACING)) { case DOWN: { break; } case EAST: { statebehind = world.getBlockState(new BlockPos(pos.getX()-1, pos.getY(), pos.getZ())); behind = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ()); break; } case NORTH: { statebehind = world.getBlockState(new BlockPos(pos.getX(), pos.getY(), pos.getZ()+1)); behind = new BlockPos(pos.getX(), pos.getY(), pos.getZ()+1); break; } case SOUTH: { statebehind = world.getBlockState(new BlockPos(pos.getX(), pos.getY(), pos.getZ()-1)); behind = new BlockPos(pos.getX(), pos.getY(), pos.getZ()-1); break; } case UP: { } case WEST: { statebehind = world.getBlockState(new BlockPos(pos.getX()+1, pos.getY(), pos.getZ())); behind = new BlockPos(pos.getX()+1, pos.getY(), pos.getZ()); break; } } } }
-
are you adding this functionality to a block or an item? or just for a command?
-
[1.12] Shift-Clicking Crafting Output with Container Items
tebreca replied to ChampionAsh5357's topic in Modder Support
tomorrow i can maybe help you -
[1.12] Shift-Clicking Crafting Output with Container Items
tebreca replied to ChampionAsh5357's topic in Modder Support
ok, then im sorry but im not very known with those, i always create my own IRecipe implementing recipe class for that sort of stuff, i think it might be something in the forge recipe json parsing but im not 100% sure, try and find the class who reads the recipe jsons and maybe you find the method which is broken or maybe you can find the way how its suposed to be, i dont have time to do it for you, im sorry for that -
thx ill try that
-
[1.12] Shift-Clicking Crafting Output with Container Items
tebreca replied to ChampionAsh5357's topic in Modder Support
how do register the recipe?, using json or just java code? -
[1.12] Shift-Clicking Crafting Output with Container Items
tebreca replied to ChampionAsh5357's topic in Modder Support
Do you have your source code? -
Hello everybody, im working on a harvester and wrote a tileentity which checks in a 3x3 area for full grown crops. But it does not work, i need to clean up my code, i know but ill do that if the harvester works Code : public class TileHarvesterTicker extends TileEntity implements ITickable{ BlockPos checkstart = null; IBlockState statebehind = null; BlockPos behind = null; private int x = 0; private int y = 0; private int z = 0; @Override public void update() { if (checkstart == null) switch (world.getBlockState(pos).getValue(Machine.FACING)) { case DOWN: { break; } case EAST: { checkstart = new BlockPos(pos.getX()+1, pos.getY(), pos.getZ()-1); break; } case NORTH: { checkstart = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ()-3); break; } case SOUTH: { checkstart = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ()+1); break; } case UP: { } case WEST: { checkstart = new BlockPos(pos.getX()-3, pos.getY(), pos.getZ()-1); break; } } if (x == 3) { x=0;z++; }else if (z == 4) z=0;x=0; IBlockState state = world.getBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z)); if (state == Blocks.WHEAT.getBlockState().getBaseState().withProperty(net.minecraft.block.BlockCrops.AGE, 7)) { if(statebehind == null) { switch (world.getBlockState(pos).getValue(Machine.FACING)) { case DOWN: { break; } case EAST: { statebehind = world.getBlockState(new BlockPos(pos.getX()-1, pos.getY(), pos.getZ())); behind = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ()); break; } case NORTH: { statebehind = world.getBlockState(new BlockPos(pos.getX(), pos.getY(), pos.getZ()+1)); behind = new BlockPos(pos.getX(), pos.getY(), pos.getZ()+1); break; } case SOUTH: { statebehind = world.getBlockState(new BlockPos(pos.getX(), pos.getY(), pos.getZ()-1)); behind = new BlockPos(pos.getX(), pos.getY(), pos.getZ()-1); break; } case UP: { } case WEST: { statebehind = world.getBlockState(new BlockPos(pos.getX()+1, pos.getY(), pos.getZ())); behind = new BlockPos(pos.getX()+1, pos.getY(), pos.getZ()); break; } } } world.setBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z), state.withProperty(BlockCrops.AGE, 0)); new EntityItem(world, behind.getX(), behind.getY(), behind.getZ(), new ItemStack(Items.WHEAT)); } else if (state == Blocks.CARROTS.getBlockState().getBaseState().withProperty(net.minecraft.block.BlockCrops.AGE, 7)) { if(statebehind == null) { switch (world.getBlockState(pos).getValue(Machine.FACING)) { case DOWN: { break; } case EAST: { statebehind = world.getBlockState(new BlockPos(pos.getX()-1, pos.getY(), pos.getZ())); behind = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ()); break; } case NORTH: { statebehind = world.getBlockState(new BlockPos(pos.getX(), pos.getY(), pos.getZ()+1)); behind = new BlockPos(pos.getX(), pos.getY(), pos.getZ()+1); break; } case SOUTH: { statebehind = world.getBlockState(new BlockPos(pos.getX(), pos.getY(), pos.getZ()-1)); behind = new BlockPos(pos.getX(), pos.getY(), pos.getZ()-1); break; } case UP: { } case WEST: { statebehind = world.getBlockState(new BlockPos(pos.getX()+1, pos.getY(), pos.getZ())); behind = new BlockPos(pos.getX()+1, pos.getY(), pos.getZ()); break; } } } world.setBlockState(new BlockPos(checkstart.getX() + x, checkstart.getY(), checkstart.getZ()+z), state.withProperty(BlockCrops.AGE, 0)); new EntityItem(world, behind.getX(), behind.getY(), behind.getZ(), new ItemStack(Items.CARROT, (int) (Math.random() * Math.random() * 2 +1))); } x++; } } source: https://github.com/Eaglesmoddingteam/Eagles-Essentials/tree/master/src/main
-
what sould i then use to make this work
-
i need to return an int, i dont know which nuber will give me wich color
-
what are the values of the colors?
-
thx, ill try that
-
So i am working on my seasons mod, and i fixed the seasons register system, but i want to edit grass color depending on the seasons, I cant work out how to do this, i want to get it in my btf.utils.seasons package. Could someone please help? source: https://github.com/eaglesmoddingteam/Eagles-Essentials
-
this.setDefaultState(this.blockState.getBaseState().withProperty(is_on, false)); should be: this.setDefaultState(this.blockState.getBaseState().withProperty(is_on, false)); this.setDefaultState(this.blockState.getBaseState().withProperty(is_on, Boolean.valueOf(false)));
-
ok, but i meant: How can i register days, like what is the most efficient way of getting when a new day starts so i can register it in my map data? and so i can calculate the current season and the stage of the season. Because i wanna override the grasscolors, flower colors and leave colors on client side depending on the season.
-
thx for the help, i already tought about doing something with the ITickable interface, is that better for doing the ticks? i have read the docs but i didnt understand, now i've read it again and i understand it now, maybe it was allitle bit too late yesterday. should i make a new post or just ask here if i need to use a ITickable to make the worldstoreddata tick?
-
Hello, I want to create seasons, but i dont really understand the Inheritance of the classes, I need to use Write and Read to NBT methods, but i dont understand how the information gets called in my class and how to write stuff to nbt if i dont get any parameters for what to write. i would like some help here, my seasons class: package btf.objects.worldDataSaving; import btf.main.Vars; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.storage.WorldSavedData; public class Seasons extends WorldSavedData { private static final String DATA_NAME = Vars.MOD_ID + "_ExampleData"; // Required constructors public Seasons() { super(DATA_NAME); } public Seasons(String s) { super(s); } @Override public void readFromNBT(NBTTagCompound nbt) { } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { return null; } } the eventhandler for the ticking and registering days: @EventBusSubscriber public class EventHandler { int i = 0; MapStorage storage = null; public void onworldTick(WorldTickEvent event) { World tickingWorld = event.world; if (storage == null) { storage = tickingWorld.getMapStorage(); }else { if (i >= 24000) { i=0; WorldSavedData data = storage.getOrLoadData(Seasons.class, "CurrentSeason"); }else { i++; } } } public void atsleep(PlayerSleepInBedEvent event) { World tickingWorld = event.getEntityPlayer().getEntityWorld(); if (storage == null) { storage = tickingWorld.getMapStorage(); } //writenextday } }