-
Posts
103 -
Joined
-
Last visited
Everything posted by GloriousAlpaca
-
Hello, I am trying to make an Itemstack with an energy capability, however the durability bar and tooltip are only updated when I press the right mouse button. This is the Code for my onItemRightClick-Method: and this is the code for the "Information" - Methods: Thank you for your help!
-
Hello, I am currently making an item that has the energy capability and is supposed to show it's current energy level in a durability bar, however this durability bar is only updated when the item is charged fully or when I press the right mouse button. I suspect that I need to send a packet to synchronize the energy level with the client, but I am not sure how I could convert the itemstack to bytes. I also don't understand why it even updates the durability bar at all if it needs a packet (maybe the onrightclick method updates the itemstack ?). Here is the code for the durability bar: This is the code for the onRightClick-Method: Thank you for your help!
-
[1.12.2] Potentially dangerous prefix
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Thank you very much for your answer! -
Hello, the problem I was having is actually seemingly solved, however I want to understand why I was having the error. In the starting phase of minecraft there was the error: [22:11:51] [Client thread/WARN] [FML]: Potentially Dangerous alternative prefix `leer:0` for name `meteorite`, expected `leer`. This could be a intended override, but in most cases indicates a broken mod. and whenever I created a new world I also got the error that there was a missing registry entry. This was the code of my Entity Registry: This is my "fixed" code: As you can see the only change was the domain of the resourcelocation. Thank you for your help!
-
[1.12.2] When to register an Entity?
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Thank you very much for your help, I'll try doing that. -
[1.12.2] When to register an Entity?
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Well I have already changed my Code so it is registered. This is the Code in my Main Mod Class and this is the InitEntities Class However if you say it doesn't work when I'm not registering it I'll leave my code as it is right now. How would I then go about deleting the spawn egg (my entity is not a living entity)? Thank you for your answer. -
Hello, in what case should you register an entity or rather, what exactly does registering change ? I have been using my entity without registering it just fine, the only thing that changed after registering it, is that there's now a spawn egg for it. I do not want it to have a spawn egg however, so should I just not register it ? Thank you!
-
[1.12.2] How to make non-living entity spawn in the world?
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
First of all thank you very much for your help! I thought about using a EventHandler to check for spawning conditions on the world tick, but I was concerned about the performance. Thank you -
[1.12.2] Non-Destructible Pickaxe
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Thank you, that's what I did and the pickaxe now works the way I wanted. -
[1.12.2] Non-Destructible Pickaxe
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Thank you this will help! -
[1.12.2] Non-Destructible Pickaxe
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
I want to be able to "charge" the pickaxe with lava, so I just want it to not be able to mine when at 0 durability. -
[1.12.2] Non-Destructible Pickaxe
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
I mean it doesn't shatter when it hits 0 durability, as in getting removed from your inventory. -
Hello, how would I go about making a pickaxe that, while still losing durability, does not completely break? Thank you!
-
First of all thanks for your time! I tried completely removing the code in my update method and it still does not work. The energy cell is being drained however it is just not showing up in my machine. This is my capability code by the way maybe the error lies in there: @Override public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) { if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return true; } if(capability == CapabilityEnergy.ENERGY) { return true; } return super.hasCapability(capability, facing); } @Nullable @Override public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) { if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return (T)inventory; } if(capability == CapabilityEnergy.ENERGY) { return (T)energy; } return super.getCapability(capability, facing); }
-
Hello, I'm trying to make a block that can accept energy, however I have run into some weird behaviour. First of all this is my code: @Override public void update(){ if ((energy.getEnergyStored() != energy.getMaxEnergyStored())) { for(EnumFacing face : EnumFacing.values()) { BlockPos a = getPos().offset(face); TileEntity tile = world.getTileEntity(a); if (tile != null && tile.hasCapability(CapabilityEnergy.ENERGY,face.getOpposite())) { int push = tile.getCapability(CapabilityEnergy.ENERGY,face.getOpposite()).extractEnergy(energy.getMaxRec(),false); energy.receiveEnergy(push, false); System.out.println("ENERGIEZUFUHR: "+energy.getEnergyStored()+" gesendet: "+push); } } } } My block can accept energy from Thermal Expansion energy cells with no problem, on the contrary fluxducts do not work. It also does not work with Ender IO as it does not detect the energy conduits and, while detecting it, cannot drain an energy bank. Thank you for your Help!
-
Hello, I'm having a problem with my tile entity while searching for nearby EnergyStorages (Conduits). This is my code for finding adjacent Tile Entities with the EnergyStorage Capability: @Override public void update(){ if ((energy.getEnergyStored() != energy.getMaxEnergyStored())) { for(EnumFacing face : EnumFacing.values()) { BlockPos a = getPos().offset(face); TileEntity tile = world.getTileEntity(a); System.out.println(face.getName()); if (tile.hasCapability(CapabilityEnergy.ENERGY,face.getOpposite())) { System.out.println("ENERGIEZUFUHR"); /*int maxCap = energy.receiveEnergy(energy.getMaxRec(), true); energy.receiveEnergy(tile.getCapability(CapabilityEnergy.ENERGY,face).extractEnergy(maxCap,false), false);*/ } } } } The method for receiving energy is currently a comment to avoid unrelated crashes. This is the crash report I'm getting: ---- Minecraft Crash Report ---- WARNING: coremods are present: EnderCorePlugin (EnderCore-1.12.2-0.5.37.jar) Contact their authors BEFORE contacting forge // Why is it breaking :( Time: 9/9/18 10:00 AM Description: Ticking block entity java.lang.NullPointerException: Ticking block entity at com.andreas.ame.tileentities.EntityLaser.update(EntityLaser.java:34) at net.minecraft.world.World.updateEntities(World.java:2004) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:643) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:842) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) at java.lang.Thread.run(Thread.java:748) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace: at com.andreas.ame.tileentities.EntityLaser.update(EntityLaser.java:34) -- Block entity being ticked -- Details: Name: ame:lasertable // com.andreas.ame.tileentities.EntityLaser Block type: ID #254 (tile.lasertable // com.andreas.ame.block.LaserTable) Block data value: 1 / 0x1 / 0b0001 Block location: World: (-254,65,248), Chunk: (at 2,4,8 in -16,15; contains blocks -256,0,240 to -241,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Actual block type: ID #254 (tile.lasertable // com.andreas.ame.block.LaserTable) Actual block data value: 1 / 0x1 / 0b0001 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:2004) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:643) -- Affected level -- Details: Level name: TEST All players: 0 total; [] Chunk stats: ServerChunkCache: 625 Drop: 0 Level seed: 6028521562681449438 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: World: (-228,64,236), Chunk: (at 12,4,12 in -15,14; contains blocks -240,0,224 to -225,255,239), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 257696 game time, 257696 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 123631 (now: false), thunder time: 150 (now: true) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:842) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) at java.lang.Thread.run(Thread.java:748) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_171, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 378688064 bytes (361 MB) / 1168637952 bytes (1114 MB) up to 1894252544 bytes (1806 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP 9.42 Powered by Forge 14.23.4.2705 24 mods loaded, 24 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:--------- |:--------------------------------- |:------------- |:----------------------------------------------- |:---------------------------------------- | | UCHIJAAAA | minecraft | 1.12.2 | minecraft.jar | None | | UCHIJAAAA | mcp | 9.42 | minecraft.jar | None | | UCHIJAAAA | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.4.2705.jar | None | | UCHIJAAAA | forge | 14.23.4.2705 | forgeSrc-1.12.2-14.23.4.2705.jar | None | | UCHIJAAAA | ame | 1.0 | ame-0.1.jar | None | | UCHIJAAAA | codechickenlib | 3.2.0.345 | CodeChickenLib-1.12.2-3.2.0.345-universal.jar | f1850c39b2516232a2108a7bd84d1cb5df93b261 | | UCHIJAAAA | redstoneflux | 2.0.2 | RedstoneFlux-1.12-2.0.2.3-universal.jar | 8a6abf2cb9e141b866580d369ba6548732eff25f | | UCHIJAAAA | cofhcore | 4.5.2 | CoFHCore-1.12.2-4.5.2.19-universal.jar | None | | UCHIJAAAA | cofhworld | 1.2.0 | CoFHWorld-1.12.2-1.2.0.5-universal.jar | 8a6abf2cb9e141b866580d369ba6548732eff25f | | UCHIJAAAA | endercore | 1.12.2-0.5.37 | EnderCore-1.12.2-0.5.37.jar | None | | UCHIJAAAA | thermalfoundation | 2.5.0 | ThermalFoundation-1.12.2-2.5.0.19-universal.jar | 8a6abf2cb9e141b866580d369ba6548732eff25f | | UCHIJAAAA | thermalexpansion | 5.5.0 | ThermalExpansion-1.12.2-5.5.0.29-universal.jar | 8a6abf2cb9e141b866580d369ba6548732eff25f | | UCHIJAAAA | enderio | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderiointegrationtic | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderiobase | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderioconduits | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderioconduitsappliedenergistics | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderioconduitsopencomputers | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderioconduitsrefinedstorage | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderiointegrationforestry | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderiointegrationticlate | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderiomachines | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | enderiopowertools | 5.0.31 | EnderIO-1.12.2-5.0.31.jar | None | | UCHIJAAAA | thermaldynamics | 2.5.1 | ThermalDynamics-1.12.2-2.5.1.14-universal.jar | 8a6abf2cb9e141b866580d369ba6548732eff25f | Loaded coremods (and transformers): EnderCorePlugin (EnderCore-1.12.2-0.5.37.jar) com.enderio.core.common.transform.EnderCoreTransformer com.enderio.core.common.transform.SimpleMixinPatcher GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Ender IO: No known problems detected. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!You are looking at the diagnostics information, not at the crash. !!! !!!Scroll up until you see the line with '---- Minecraft Crash Report ----'!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Profiler Position: N/A (disabled) Player Count: 0 / 8; [] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' I get it instantly if I place the block. Help would be appreciated!
-
[1.12.2]Container Crash: Ticking player
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Okay i'll give it a go! Thank you for helping. -
[1.12.2]Container Crash: Ticking player
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
I'll remember that thanks! -
[1.12.2]Container Crash: Ticking player
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Okay that's great! I have tried implementing it there but failed miserably thus just leaving it out. How would I give it the capability ? -
[1.12.2]Container Crash: Ticking player
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Okay so if i understand this correctly i'm giving the coordinates in pixels on my image? -
[1.12.2]Container Crash: Ticking player
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
The Entity Class is basically empty: