Everything posted by Draco18s
-
[1.12] Texture Issue. Please Help
Magic. All that is important to you as the mod developer is that methods marked with certain annotations are called automatically for you. SubscribeEvent and EventHandler are of that type. You only need to tell Forge about the class in some manner (in this case, that's handled by another annotation: @Mod.EventBusSubscriber).
-
1.10.2 Problems with making mob shearable.
This does nothing useful. You're saying "this dragon is now sheared" and the function goes "Ok!" and the state of the dragon (whether or not it has been sheared) doesn't change. There's a reason it's called a setter. It sets a field.
-
[1.11.2] Conversion Question for Ticks and Misc.
Function overhead is almost zero.
-
[1.11.2] Create a custom shot out entity
I can't help you fix code that hasn't been written. Write it, then show it to me along with what it isn't doing. And use a debugger to see what's going wrong.
-
PlayerTickEvent being called twice in 1.12?
PlayerEvent.ItemPickupEvent will handle anything dropped into the world. AnvilRepairEvent will handle anything with the anvil. PlayerContainerEvent.Open will handle chests. PlayerEvent.ItemCraftedEvent handles crafting. However. Since we're dealing with 1.12 and the fact that you should be using Capabilities... You should be using the AttachCapabilitiesEvent<ItemStack> event to attach a capability to the stack when it is created.
-
PlayerTickEvent being called twice in 1.12?
I don't know why you're doing this in PlayerTick anyway. But that aside... 1) Do you have more than one sword in your inventory? 2) Are you calling this function from anywhere else?
-
[1.11.2] Create a custom shot out entity
Well you have to actually update the things that need updating. protected boolean isArrow(ItemStack stack) { return stack.getItem() instanceof ItemArrow; } You're still consuming arrows in order to consume ammo. ItemArrow itemarrow = (ItemArrow)((ItemArrow)(itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.ARROW)); EntityArrow entityarrow = itemarrow.createArrow(worldIn, itemstack, entityplayer); And still using arrows to get the entity to spawn.
-
PlayerTickEvent being called twice in 1.12?
@SubscribeEvent public void onPlayerTick(PlayerTickEvent event) { if (!event.player.getEntityWorld().isRemote) { if (event.phase == Phase.START) { System.out.println(event.player.world.getTotalWorldTime()); } } } I am not able to replicate. 42997 42998 42999 43000 43001 43002 If it was running twice per tick, I would see doubled output.
-
PlayerTickEvent being called twice in 1.12?
Are you checking Server vs. Client as well? I don't know because you haven't posted any code
-
PlayerTickEvent being called twice in 1.12?
PlayerTickEvent is one of the events that has a phase, START and END.
-
[1.11.2] Create a custom shot out entity
Well...is your current code posted somewhere?
-
[1.11.2] Conversion Question for Ticks and Misc.
Math. Time Left In Ticks = Duration - (Current Time - Start Time) Time Left in Minutes = Time Left in Ticks / (20 * 60)
-
ItemStack item changing
"It hurts doctor. It hurts." Please define "doesn't work" in a manner that is actually troubleshootable.
-
[1.11.2] Create a custom shot out entity
"It hurts doctor. It hurts." Please define "doesn't work" in a manner that is actually troubleshootable.
-
Replace Biome X by Biome Y on Biome X spawn
It is fired for everything.
- ItemStack item changing
-
[1.11.2] Create a custom shot out entity
Well. You're still asking the vanilla arrow item for the entity that it spawns...
-
[1.11.2] Conversion Question for Ticks and Misc.
The tooltip gets updated every render frame. You can query the current time from the world (getInformation is Side-Only so you can safely use Minecraft.getMinecraft() if necessary) and calculate the duration.
-
Custom Harvest Tool with Harvestability by Hand [11.2]
The block doesn't control texture and model. The json files and the registry name do.
-
[1.11.2] Create a custom shot out entity
If you want a projectile to not look like an arrow, you'd need to create a new entity class. The last time I did that was 1.7: https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/entity/EntitySpecialArrow.java
-
Documentation for p_ variables ?
Technically there are 4 different names: The original source (only Mojang has this) The obfuscated names, aka Notch names (these are generated by the compile process and look like aa.bbcfa, you would see these if you opened the vanilla jar in JD-GUI, these will be arbitrary as source code changes) The SRG names (these are the ones you're seeing, generated by the decompile process with names like p_12345_c and func_765432_f and are generally stable as the source code changes and new versions are released) The MCP names (these are community supplied via MCPbot, mapped to SRG names)
-
[1.7.10] Pixel format not accelerated (runClient task)
Current version is 1.12, previous version is 1.11. 1.7.10 threads have been locked and closed as unsupported for at least 6 months. Heck, there's one still on the first page.
-
[1.7.10] Pixel format not accelerated (runClient task)
1.7.10 is no longer supported here
- ItemStackHolder crashes on private field (ObjectHolder doesn't)
-
[1.12] Can not register to a locked registry
You can download it from GitHub https://github.com/MinecraftForge/Documentation
IPS spam blocked by CleanTalk.