Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Mattizin

Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by Mattizin

  1. Show the Block class, maybe you are missing one of the isFullCube() or isFullyOpaque() methods
  2. You meant tick not second correct? 2o ticks are one second(normally) so when you only run your code every 20 ticks it only runs every second And yes i meant to not run it every tick
  3. Just dont run the code every second. Create a TickHandler/Timer which counst the ticks and only if for example you reach 20 (second) you run your code.
  4. you write/read to nbt on every update which is once a tik, which is 20 times a second. I think read and write to nbt should only be done on world load or unload...
  5. Where is your registerRenders() in the COmmon proxy getting called to call the one in the client Proxy?
  6. We still dont know what your MathHelper.floor_double Method deos. nbody will understand this thread in the future
  7. Why do you check for the class??? just check for the Block instance Blocks.Crops itself...
  8. Would this really be better, just because the code is a bit shorter? I mean you store the Strings in the Array the whole time with that solution
  9. Use GameRegistry.register(Object k) But you have to register the itemblock on its own now.
  10. Solution: the .mcmeta files have to be named filename.png.mcmeta, nor filename.mcmeta
  11. Yeah, but what can teh error be? does the mcmeta files and textures have to be linked else where?
  12. Block.getBlockHardness is, use the blockstate version with state as object.
  13. I copied them over and it makes sense they are needed after i looked into them, but i get the same error (refreshed my IDE). It seems like they are not beeing used (i renamed them to match my texture names). What else do i need to do?
  14. Hi, with the helpt of nice IRC people i successfully registered a new fluid. TO test it i just copied the water_flow and water_still textures into my asset folder and renamed them to my fluid. When i start the game now i get the following error which i cant resolve, because im using vanilla textures for testing. Ingame the Fluid then has no texture: 2016-10-03 23:15:40,808 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-10-03 23:15:40,809 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [23:15:40] [main/INFO] [GradleStart]: Extra: [] [23:15:40] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/matts/.gradle/caches/minecraft/assets, --assetIndex, 1.10, --accessToken{REDACTED}, --version, 1.10.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [23:15:40] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [23:15:40] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [23:15:40] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [23:15:40] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [23:15:40] [main/INFO] [FML]: Forge Mod Loader version 12.18.1.2095 for Minecraft 1.10.2 loading [23:15:40] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_65, running on Windows 10:amd64:10.0, installed at D:\Program Files (x86)\Java\jdk1.8.0_65\jre [23:15:40] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [23:15:40] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [23:15:40] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [23:15:40] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [23:15:40] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [23:15:40] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [23:15:40] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [23:15:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [23:15:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [23:15:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [23:15:41] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [23:15:42] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [23:15:42] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [23:15:42] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [23:15:43] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [23:15:43] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [23:15:43] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [23:15:43] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} 2016-10-03 23:15:44,526 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-10-03 23:15:44,562 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-10-03 23:15:44,564 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [23:15:44] [Client thread/INFO]: Setting user: Player465 [23:15:49] [Client thread/WARN]: Skipping bad option: lastServer: [23:15:49] [Client thread/INFO]: LWJGL Version: 2.9.4 [23:15:51] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:221]: ---- Minecraft Crash Report ---- // My bad. Time: 03.10.16 23:15 Description: Loading screen debug info This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_65, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 343036328 bytes (327 MB) / 597164032 bytes (569 MB) up to 1897922560 bytes (1810 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 372.90' Renderer: 'GeForce GTX 970/PCIe/SSE2' [23:15:51] [Client thread/INFO] [FML]: MinecraftForge v12.18.1.2095 Initialized [23:15:51] [Client thread/INFO] [FML]: Replaced 232 ore recipes [23:15:51] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [23:15:51] [Client thread/INFO] [FML]: Searching D:\Development\60_Minecraft_workspace\Mattech Biogas\run\mods for mods [23:15:52] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [23:15:53] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, mattechbiogas] at CLIENT [23:15:53] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, mattechbiogas] at SERVER [23:15:53] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mattech Biogas [23:15:53] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [23:15:53] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations [23:15:53] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [23:15:53] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [23:15:53] [Client thread/INFO] [FML]: Applying holder lookups [23:15:53] [Client thread/INFO] [FML]: Holder lookups applied [23:15:53] [Client thread/INFO] [FML]: Applying holder lookups [23:15:53] [Client thread/INFO] [FML]: Holder lookups applied [23:15:53] [Client thread/INFO] [FML]: Applying holder lookups [23:15:53] [Client thread/INFO] [FML]: Holder lookups applied [23:15:53] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [23:15:53] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [23:15:53] [Client thread/INFO] [FML]: Applying holder lookups [23:15:53] [Client thread/INFO] [FML]: Holder lookups applied [23:15:53] [Client thread/INFO] [FML]: Injecting itemstacks [23:15:53] [Client thread/INFO] [FML]: Itemstack injection complete [23:15:54] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: AHEAD Target: null [23:15:59] [sound Library Loader/INFO]: Starting up SoundSystem... [23:15:59] [Thread-8/INFO]: Initializing LWJGL OpenAL [23:15:59] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [23:15:59] [Thread-8/INFO]: OpenAL initialized. [23:15:59] [sound Library Loader/INFO]: Sound engine started [23:16:02] [Client thread/INFO] [FML]: Max texture size: 16384 [23:16:02] [Client thread/INFO]: Created: 16x16 textures-atlas [23:16:04] [Client thread/INFO] [FML]: Injecting itemstacks [23:16:04] [Client thread/INFO] [FML]: Itemstack injection complete [23:16:04] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [23:16:04] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mattech Biogas [23:16:06] [Client thread/INFO]: SoundSystem shutting down... [23:16:06] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [23:16:06] [sound Library Loader/INFO]: Starting up SoundSystem... [23:16:06] [Thread-10/INFO]: Initializing LWJGL OpenAL [23:16:06] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [23:16:06] [Thread-10/INFO]: OpenAL initialized. [23:16:07] [sound Library Loader/INFO]: Sound engine started [23:16:09] [Client thread/INFO] [FML]: Max texture size: 16384 [23:16:09] [Client thread/INFO]: Created: 1024x512 textures-atlas [23:16:10] [Client thread/WARN]: Skipping bad option: lastServer: [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found. [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: DOMAIN mattechbiogas [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------------------------------- [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: domain mattechbiogas is missing 0 textures [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: domain mattechbiogas has 1 location: [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: mod mattechbiogas resources at D:\Development\60_Minecraft_workspace\Mattech Biogas\bin [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: ------------------------- [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: The following other errors were reported for domain mattechbiogas: [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: ------------------------- [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: Problem: broken aspect ratio and not an animation [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: textures/blocks/silage_flowing.png [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: textures/blocks/silage_still.png [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [23:16:10] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= [23:16:11] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [23:16:37] [server thread/INFO]: Starting integrated minecraft server version 1.10.2 [23:16:37] [server thread/INFO]: Generating keypair [23:16:37] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance [23:16:37] [server thread/INFO] [FML]: Applying holder lookups [23:16:37] [server thread/INFO] [FML]: Holder lookups applied [23:16:37] [server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@65648370) [23:16:37] [server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@65648370) [23:16:38] [server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@65648370) [23:16:38] [server thread/INFO]: Preparing start region for level 0 [23:16:39] [server thread/INFO]: Preparing spawn area: 36% [23:16:39] [server thread/INFO]: Changing view distance to 12, from 10 [23:16:40] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2 [23:16:40] [Netty Server IO #1/INFO] [FML]: Client protocol version 2 [23:16:40] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : mattechbiogas@0.1,FML@8.0.99.99,Forge@12.18.1.2095,mcp@9.19 [23:16:40] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [23:16:40] [server thread/INFO] [FML]: [server thread] Server side modded connection established [23:16:40] [server thread/INFO]: Player465[local:E:84d5b6d9] logged in with entity id 350 at (-24.442022698985287, 69.66877775836132, 248.87219427111603) [23:16:40] [server thread/INFO]: Player465 joined the game [23:16:42] [server thread/INFO]: Saving and pausing game... [23:16:42] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [23:16:42] [server thread/INFO]: Saving chunks for level 'New World'/Nether [23:16:42] [server thread/INFO]: Saving chunks for level 'New World'/The End [23:16:42] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@42c891df[id=d447d002-8f00-3c6c-8a29-93b028d90375,name=Player465,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3060) [Minecraft.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:131) [skinManager$3.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_65] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_65] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_65] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_65] [23:17:09] [server thread/INFO]: Saving and pausing game... [23:17:09] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [23:17:09] [server thread/INFO]: Saving chunks for level 'New World'/Nether [23:17:09] [server thread/INFO]: Saving chunks for level 'New World'/The End [23:17:09] [server thread/INFO]: Stopping server [23:17:09] [server thread/INFO]: Saving players [23:17:09] [server thread/INFO]: Saving worlds [23:17:09] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [23:17:09] [server thread/INFO]: Saving chunks for level 'New World'/Nether [23:17:09] [server thread/INFO]: Saving chunks for level 'New World'/The End [23:17:10] [server thread/INFO] [FML]: Unloading dimension 0 [23:17:10] [server thread/INFO] [FML]: Unloading dimension -1 [23:17:10] [server thread/INFO] [FML]: Unloading dimension 1 [23:17:10] [server thread/INFO] [FML]: Applying holder lookups [23:17:10] [server thread/INFO] [FML]: Holder lookups applied [23:17:11] [Client thread/INFO]: Stopping! [23:17:11] [Client thread/INFO]: SoundSystem shutting down... [23:17:11] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
  15. Thank you very much, i got the same idea while looking at examples for the Tesla Api an hour ago, everythign works fine
  16. I want to use the new Forge Energy Capabilty System, thats my Energy API
  17. So, i learned how tu use Capabilities on TEs. This is really simple. I know the Energy Capability can also be used for Itemstacks, but how do i create an item that uses engery, has internal storage and more with the CapabilityEnergy so that for example my maschines can charge it. I searched a lot the pat hours and only find tutorials or example code for the rf api(which only works with interfaces) or how to create own capabilities, which again isnt my goal I think i will just need a bit of a starting point here
  18. Ok i solved it with just rewriting sendanddetectchanges and sendprogressbarUpdate from scratch. Only thing i changed is to set the parameter "value to change" to 0 instead of the actual field that has to be changed. I dont like the way vanilly does the progressbar things with hardcoded integers that describe the field of the te. Why do i want to do sth like this?
  19. This is my whole Container: public class ContainerCharger extends Container { private TileEntityCharger te; private int energy; public ContainerCharger(IInventory playerInventory, TileEntityCharger te) { this.te = te; // This container references items out of our own inventory (the 9 slots we hold ourselves) // as well as the slots from the player inventory so that the user can transfer items between // both inventories. The two calls below make sure that slots are defined for both inventories. addOwnSlots(); addPlayerSlots(playerInventory); } @Override public void detectAndSendChanges() { super.detectAndSendChanges(); for(int i = 0; i < this.listeners.size(); i++) { IContainerListener icontainerlistener = (IContainerListener)this.listeners.get(i); if(this.energy != te.getCapability(CapabilityEnergy.ENERGY, null).getEnergyStored()) { icontainerlistener.sendProgressBarUpdate(this, this.energy, this.te.getCapability(CapabilityEnergy.ENERGY, null).getEnergyStored()); } } this.energy = this.te.getCapability(CapabilityEnergy.ENERGY, null).getEnergyStored(); } @SideOnly(Side.CLIENT) public void updateProgressBar(int id, int data) { ((BaseEnergyStorage)this.te.getCapability(CapabilityEnergy.ENERGY, null)).setEnergyStored(data); } private void addOwnSlots() { IItemHandler itemHandler = this.te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); addSlotToContainer(new SlotItemHandler(itemHandler, 0, 64, 34)); addSlotToContainer(new SlotOutput(itemHandler, 1, 100, 34)); } private void addPlayerSlots(IInventory playerInventory) { // Slots for the main inventory for (int row = 0; row < 3; ++row) { for (int col = 0; col < 9; ++col) { int x = 10 + col * 18; int y = row * 18 + 70; this.addSlotToContainer(new Slot(playerInventory, col + row * 9 + 10, x, y)); } } // Slots for the hotbar for (int row = 0; row < 9; ++row) { int x = 10 + row * 18; int y = 58 + 70; this.addSlotToContainer(new Slot(playerInventory, row, x, y)); } } @Nullable @Override public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = null; Slot slot = this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index < TileEntityCharger.SIZE) { if (!this.mergeItemStack(itemstack1, TileEntityCharger.SIZE, this.inventorySlots.size(), true)) { return null; } } else if (!this.mergeItemStack(itemstack1, 0, TileEntityCharger.SIZE, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack(null); } else { slot.onSlotChanged(); } } return itemstack; } @Override public boolean canInteractWith(EntityPlayer playerIn) { return te.canInteractWith(playerIn); } } the canInteractwith returns te.canInteractWith which is: public boolean canInteractWith(EntityPlayer playerIn) { // If we are too far away from this tile entity you cannot use it return !isInvalid() && playerIn.getDistanceSq(pos.add(0.5D, 0.5D, 0.5D)) <= 64D; }
  20. Both the getServerGuiElement and the client one are getting called while opening the gui
  21. ok i got that now, but the pronlem with the synced data is still there, i will test more arund it. Do you need more information?
  22. i thought that is the purpose of proxys Here you go: public class CommonProxy { public void preInit(FMLPreInitializationEvent event) { ModBlocks.registerBlocks(); ModItems.registerItems(); ModTileEntities.registerTileEntities(); } public void init(FMLInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler(MattechBiogas.instance, new GuiHandler()); } public void postInit(FMLPostInitializationEvent event) { } } public class ClientProxy extends CommonProxy { @Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); MattechBiogasModelManager.registerBlockModels(); } @Override public void init(FMLInitializationEvent event) { super.init(event); } @Override public void postInit(FMLPostInitializationEvent event) { super.postInit(event); } } public class ServerProxy extends CommonProxy { @Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); } @Override public void init(FMLInitializationEvent event) { super.init(event); } @Override public void postInit(FMLPostInitializationEvent event) { super.postInit(event); } } Does not implementing ITileEntityProvider change anything or is it just style wise?
  23. Here you go: @Mod(modid = MattechBiogas.MODID, name = MattechBiogas.NAME, version = MattechBiogas.VERSION) public class MattechBiogas { public static final String MODID = "mattechbiogas"; public static final String NAME = "Mattech Biogas"; public static final String VERSION = "0.1"; @Instance public static MattechBiogas instance = new MattechBiogas(); @SidedProxy(clientSide="mattizin.mattechbiogas.proxy.ClientProxy", serverSide="mattizin.mattechbiogas.proxy.ServerProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); } @EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); } @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } } public class BlockCharger extends BlockMattech implements ITileEntityProvider { public static final PropertyDirection FACING = PropertyDirection.create("facing"); public static final int GUI_ID = 1; public BlockCharger() { super(Material.IRON, "blockCharger"); setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); } @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { world.setBlockState(pos, state.withProperty(FACING, FacingUtil.getFacingFromEntity(pos, placer)), 2); } @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { // Only execute on the server if (world.isRemote) { return true; } TileEntity te = world.getTileEntity(pos); if (!(te instanceof TileEntityCharger)) { return false; } player.openGui(MattechBiogas.instance, GUI_ID, world, pos.getX(), pos.getY(), pos.getZ()); return true; } @Override public IBlockState getStateFromMeta(int meta) { return getDefaultState().withProperty(FACING, EnumFacing.getFront(meta & 7)); } @Override public int getMetaFromState(IBlockState state) { return state.getValue(FACING).getIndex(); } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, FACING); } //----START ITileEntityProvider---// @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityCharger(); } //----END ITileEntityProvider---// }
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.