Everything posted by GiantNuker
- 
	
		
		[1.12]Add Velocity not working from Packet thread
		
		Thanks!!!!
 - 
	
		
		[1.12]Add Velocity not working from Packet thread
		
		so - set velocity on the client?
 - 
	
		
		[1.12]Add Velocity not working from Packet thread
		
		But I'm not changing anything on the Packet thread. It was reading the information right though.
 - 
	
		
		[1.12]Add Velocity not working from Packet thread
		
		Hi, I'm working on a mod to give players wings. This is my code to add velocity(have not added in any checks(aka is player wearing wings) to code yet.) @Override public IMessage onMessage(PacketWingStateChange message, MessageContext ctx) { // This is the player the packet was sent to the server from EntityPlayerMP serverPlayer = ctx.getServerHandler().player; // Execute the action on the main server thread by adding it as a scheduled task //WingsPacketHandler.INSTANCE.sendTo(new PacketWingStateChange(FlightState.NULL), serverPlayer); float yaw = serverPlayer.rotationYaw; float pitch = serverPlayer.rotationPitch; float f = 1.0F; double motionX = (double)(-MathHelper.sin(yaw / 180.0F * (float)Math.PI) * MathHelper.cos(pitch / 180.0F * (float)Math.PI) * f); double motionZ = (double)(MathHelper.cos(yaw / 180.0F * (float)Math.PI) * MathHelper.cos(pitch / 180.0F * (float)Math.PI) * f); double motionY = (double)(-MathHelper.sin((pitch) / 180.0F * (float)Math.PI) * f); System.out.println("pitch:" + pitch); System.out.println("yaw:" + yaw); System.out.println("motX:" + motionX + " motY:" + motionY + " motZ:" + motionZ); serverPlayer.getServerWorld().addScheduledTask(() -> { serverPlayer.addVelocity(motionX, motionY, motionZ); }); // No response packet return null; } Packets work - here's a log sample: Player does not move at all. This code is supposed to be used when player is 'flapping' thier wings, it should add velocity in the direction the're looking. Thanks for the help! Note: all the comments are from the docs(copy and paste )
 - 
	
		
		[1.12]Advancement function not running
		
		Bump
 - 
	
		
		[1.12]Advancement function not running
		
		Hi, My current problem is that my function won't run - Advancement: { "display" : { "icon" : {"item": "mocakes:cake_sponge"}, "title": { "translate": "mocakes.advancements.sponge.title" }, "description": { "translate": "mocakes.advancements.sponge.description" }, "frame": "challenge" }, "criteria": { "cake": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "item": "mocakes:cake_sponge" } ] } } }, "parent": "mocakes:cake/next", "rewards": { "experience":100, "function": "mocakes:sponge" } } My function: tell @p Here's A FREE Refund! :D give @p sponge 1 Should execute function after player gets a sponge cake in thier inventory. File Path: "WORKSPACE/src/main/resources/assets/mocakes/functions/sponge.mcfunction" Achivement shows toast, and apperars, but the function wont run. Images:
 - 
	
		
		[1.12]Help with BlockState JSON
		
		THANKS!!!!!!! Haven't worked on blockstates in a while THANKS!
 - 
	
		
		[1.12]Help with BlockState JSON
		
		{ "forge_marker": 1, "defaults": { "textures": { "particle": "mocakes:blocks/plain/side", "bottom": "mocakes:blocks/plain/bottom", "top": "mocakes:blocks/plain/top", "side": "mocakes:blocks/plain/side", "inside": "mocakes:blocks/plain/inner" }, "model": "cake_uneaten", "uvlock": true }, "variants": { "bites": { 0:{ "model":"cake_uneaten" }, 1:{ "model":"cake_slice1" }, 2:{ "model":"cake_slice2" }, 3:{ "model":"cake_slice3" }, 4:{ "model":"cake_slice4" }, 5:{ "model":"cake_slice5" }, 6:{ "model":"cake_slice6" } } } } No console complaints. File Tree: C:\Users\~\Programming\Java\Minecraft\1.12\src\main\resources\assets\mocakes\models\block\cake_plain.json
 - 
	
		
		[1.12]Help with BlockState JSON
		
		Hi, my 1.12 cake will not render, here is my JSON: { "forge_marker": 1, "defaults": { "textures": { "particle": "mocakes:blocks/plain/side", "bottom": "mocakes:blocks/plain/bottom", "top": "mocakes:blocks/plain/top", "side": "mocakes:blocks/plain/side", "inside": "mocakes:blocks/plain/inner" }, "model": "cake_uneaten", "uvlock": true }, "variants": { "bites": { 0:{ "model":"cake_uneaten" }, 1:{ "model":"cake_slice1" }, 2:{ "model":"cake_slice2" }, 3:{ "model":"cake_slice3" }, 4:{ "model":"cake_slice4" }, 5:{ "model":"cake_slice5" }, 6:{ "model":"cake_slice6" } } } } Renders as full cube, so it is not an image problem. Thanks
 - 
	
		
		1.12: Execution failed for task ':recompileMc'.
		
		Having same problem, for now, try setupDevWorkspace, wont give source files, but will let you mod
 - 
	
		
		How do recipes work in 1.12
		
		
 - 
	
		
		How do recipes work in 1.12
		
		got confused, thought there had to be a file actully named "crafting.json"
 - 
	
		
		How do recipes work in 1.12
		
		I did not know there had to be a <modid>:crafting json
 - 
	
		
		How do recipes work in 1.12
		
		What entry, it is almost exactly a vanilla copy, one of the minecrart recipe, one of the cake recipe?
 - 
	
		
		How do recipes work in 1.12
		
		Verivier said it was OK
 - 
	
		
		How do recipes work in 1.12
		
		[19:33:12] [main/ERROR]: Parsing error loading recipe mopi:crafting com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 15 column 8 path $.key.S[0].item at net.minecraft.util.JsonUtils.gsonDeserialize(SourceFile:494) ~[JsonUtils.class:?] at net.minecraft.util.JsonUtils.fromJson(SourceFile:532) ~[JsonUtils.class:?] at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$21(CraftingHelper.java:699) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper$$Lambda$97/1112485320.apply(Unknown Source) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:790) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:659) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper$$Lambda$95/2001998233.accept(Unknown Source) [CraftingHelper.class:?] at java.util.ArrayList.forEach(ArrayList.java:1249) [?:1.8.0_25] at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:614) [CraftingHelper.class:?] at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:779) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:343) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:534) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:377) [Minecraft.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 15 column 8 path $.key.S[0].item at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:505) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414) ~[JsonReader.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:738) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:731) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:910) ~[TypeAdapters$35$1.class:?] at net.minecraft.util.JsonUtils.gsonDeserialize(SourceFile:492) ~[JsonUtils.class:?] ... 25 more Not sure what caused it, my recipes are almost exact vanilla copies
 - 
	
		
		How do recipes work in 1.12
		
		Before you say "go look it up", here is what I have: in "src/main/resources/assets/mocakes/recipes" I have "cake_pan.json": { "type": "crafting_shaped", "pattern": [ "# #", "###" ], "key": { "#": { "item": "minecraft:iron_nugget" } }, "result": { "item": "mocakes:cake_pan" } } and "batter_plain.json": { "type": "crafting_shaped", "pattern": [ "ACA", "BEB", "CDC" ], "key": { "A": { "item": "minecraft:milk_bucket" }, "B": { "item": "minecraft:sugar" }, "C": { "item": "minecraft:wheat" }, "D": { "item": "mocakes:cake_pan" }, "E": { "item": "minecraft:egg" } }, "result": { "item": "mocakes:batter_plain" } } NIETHER items are craftable(they ARE registered though, they appear in tab,) I know the names are right because: [19:59:49] [main/INFO] [STDOUT]: [mods.giantnuker.backslash.BackHandler:registerItems:179]: mocakes:cake_pan [19:59:49] [main/INFO] [STDOUT]: [mods.giantnuker.backslash.BackHandler:registerItems:179]: mocakes:batter_plain log for my API
 - 
	
		
		How to create dimension-based spawns
		
		Thank you!
 - 
	
		
		How to create dimension-based spawns
		
		How do you make them biome & dimension dependent? Edit: if this is impossible, how would I go about creating my own?(I cannot find the vanilla spawning script.)
 - 
	
		
		How to create dimension-based spawns
		
		How do I create dimension based spawns if I am using a vanilla entity in a vanilla biome in a custom dimension?
 - 
	
		
		Capability issue
		
		I mean when a new mod is added all entities will get a run through of the AttatchCapabilitiesEvent?
 - 
	
		
		Capability issue
		
		Ok, I did not realize that capabilities were attached automatically.
 - 
	
		
		Capability issue
		
		if (!player.hasCapability(MagicUserProvider.USER_CAP, null)) throw new IllegalArgumentException("player object must have capability") Will capabilities automatically be created?(In which case this code is completely pointless )
 - 
	
		
		Capability issue
		
		When I am in my development environment and I run my mod, it has a capability check which determines if it can run. My mod attaches capabilities to the player(specifically them "magic user" capability) and the mod fails without it.
 - 
	
		
		Capability issue
		
		Hi, I am working with Minecraft 1.11.2 and I am having a problem with the capability system. There is the "AttachCapabilitiesEvent" but my problem is if my mod is installed AFTER a world is generated, I cannot attach ANY capabilities!(My mod REALLY needs this one) Thank you for your time
 
IPS spam blocked by CleanTalk.