Everything posted by Animefan8888
-
[1.10.2] Save NBT on a file in the world(Changed Subject Later)
- [1.7.10] Is there some event for a player swinging?
1.7.10 is no longer supported once a moderator sees this thread (probably diesieben07) it will be locked and you will be asked to update.- [1.10.2] Save NBT on a file in the world(Changed Subject Later)
Implementation is similar to extending class, you just are not limited by how many you can implement and instead of saying extends it is implements and you can only implement and interface. Tinkers Construct I believe is Open Source and should have some sort of capability. Also interfaces can extend interfaces. Read the stuff in parentheses as that is where diesieben denotes more information and names of interfaces and classes.- [1.10.2] Weird NullPointerException [SOLVED]
createBlockState is called in the constructor of Block therefore it is null.- [1.10.2] Rendering an EnchantmentTable book with diffrent texture
That renderer class is a TESR (TESR stands for TileEntitySpecialRenderer) if you look into that class you will see it extends TileEntitySpecialRenderer. This is registered via ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer()); *Note Pseudo-code not sure what would happen if you tried to do this...I am actually kind of curious.- [1.10.2] Rendering an EnchantmentTable book with diffrent texture
If it doesn't use a TESR and it is not an inventory based block you are using no need to have a TE. If it uses the model system look into its JSONs that will be your source unless minecraft has a workaround or they use an entity to draw the book.- [1.10.2] Rendering an EnchantmentTable book with diffrent texture
Sadly im not sure if this can be done with IBakedModels look into that, but before that look into how vanilla does that. I assume that it uses a TESR, if it can not be done using a IBakedModel or even a JSON model use a TESR.- Overriding all projectile motion to match server changes
The motionX motionY motionZ yaw and pitch setMotionAndHeading or similar is called right before it was created look into that for information in general.- Overriding all projectile motion to match server changes
Thanks for all the info! Okay, so I've created my event handler and I think the logic is fine. How should I register my customized entity? I tried EntityRegistry.registerGlobalEntityID(UnderwaterEntityArrow.class, "Arrow", 262); But this causes some unclear error (stacktrace doesn't yield helpful information, but I'm going to assume ID clash, I tried to use the ID of an arrow... what param should I use instead? some arbitrary large number?), any ideas? I can't seem to find examples of replacing entities, and so I'm not sure what ID I should use (or even if I'm using the right registry class). Edit: I got it to register like this (I think... at least it didn't error): EntityRegistry.registerModEntity(UnderwaterEntityArrow.class, "Arrow", 262, this, 100, 100, true); Here's my code for the event: @SubscribeEvent public void entityJoinWorldEvent(EntityJoinWorldEvent event) { if(event.entity instanceof EntityArrow) { UnderwaterEntityArrow replacement = new UnderwaterEntityArrow(event.world); Entity shooter = ((EntityArrow) event.entity).shootingEntity; replacement.setLocationAndAngles(shooter.posX, shooter.posY + (double)shooter.getEyeHeight(), shooter.posZ, shooter.rotationYaw, shooter.rotationPitch); event.world.spawnEntityInWorld(replacement); event.entity.setDead(); } } Unfortunately I get an NPE at line 43. Shooter is the only possible null thing (as replacement is instantiated just above it), what should I do? My guess would be that custom arrow isn't having its data set... Not really sure what to do. Also, is shootingEntity of EntityArrow referring to the Bow or the source (Player, Skeleton, dispenser, etc)? Im not sure what constructor you should be using look at ItemBow for which constructor it uses you will also need to set it's Motion and heading before you spawn it. *Edit Isnt shootingEntity a private field.- Overriding all projectile motion to match server changes
The entity system in minecraft is a little complex both the server and the client have a list of entities the server handles/syncs entity data. You will register and create a new Entity that extends lets say EntityArrow. In this new Entity class override onUpdate for physics calculations. If all you are changing is the speed at which it comes out just multiply the motion x/z in EntityJoinedWorldEvent. For more clarification search EntityJoinedWorldEvent and EntityConstructingEvent to find out where they are called from.- Overriding all projectile motion to match server changes
If i am i am understanding this correctly what you could do in bukkit if you can send update packets send update packets for the projectiles. If this is not an option you can subscribe to EntityJoinedWorldEvent or EntityConstructingEvent probably the prior and check if it is an instanceof EntityProjectile and then edit the motion there. If that doesn not fix it you will need to create a new Entity extending the current ones aka EntityArrow/EntitySnowball. And replace the entity in one of the events i mentioned earlier. *Edit if extending override setMotionAndHeading (I think that is what it is called if not it is similar).- [1.9.4]GUI In Game
Thanks no access to dev right now.- [1.9.4]GUI In Game
IngameGuiEvent i believe it is called you need to subscribe and register it.- [1.10.2] Xbox like crafting table
1. You need to loop through the players inventory and compare that to recipes, since recipes normally only have one in each slot just compare them in numbers and items (stacksize and the item). 2. You will need a way to identify what is a stair block, not all mods extend BlockStair. Maybe the best way to do that would be to compare collision boxes. And also do the instance of check. 3. The list should be handled on the gui then synced with the container using packets(to notify the container of the new slots). You should not use vanilla slots for this instead create a custom slot you will most likely have to disable the slots clicking based on z level(this way you dont click on multiple visably, instead you click on the one above the rest) i would just sort the list or map of the slots based on the zlevel. 4. Also sort the recipe list based on modid obviously put minecraft first.- [1.10.2] Change damage of explosion
The problem with changing the strength of the explosion below 2 is not only particle effect though. It also changed the radius of the explosion. Since display size, block damage radius, and entity damage is all based on one variable, you need to modify that with your own custom explosion.- Minecraft won't run in Eclipse after Mac crashes
1.7.10 is no longer supported though read the crash yourself if you understand Java you should have no problems.- Can you build mods against a modified version of Forge?
You should not be editing forge/minecraft directly if why would you need to build it, no one will be able to use your mod as they would beed the modified version anyway. If you want a feature added to forge then submit a pull request on their github 0age with the code.- [1.8]How to modify repeater's duration?
The powers of reflection! Or you could just create a new one, just throwing that out there.- No Clue....No Textures...
Take a look at my block video tutorial in the youtube link in my signature.- [1.10] GUI doesn't update
No you do not open the Gui on the server it only exists on the client. What happens is you tell the server this players is opening this container and then open this gui so there is a display. Packets are what you use to do this though you may be able to override getUpdateTag and handleUpdateTag but remember to call markDirty whenever the fluid changes. I am not sure if this will be a sync.- [Solved][1.8]Does keyListener run only on client side?
Keybinds are lient side only why does the server need to know he this player pressed w. The server just needs to know move forward. This is dalved via packets.- [1.7.10] Ore generation classes
1.7.10 is not supported here update to 1.10.2.- [1.7.10] Ore generation classes
WorldGenMinable and WorldProviderSettings (Ithink that was the name of the class) which contains the variables for WorldGenMinable.- [1.10] GUI doesn't update
Try looking for a packet.- [1.10] GUI doesn't update
It syncs the data between the containers then modifies it in the addListeners method i believe it is called. - [1.7.10] Is there some event for a player swinging?
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.