Everything posted by ryan_zhou
-
[1.12.2] Different item model for inventory/held in hand
sorry, my fault ,I won't be posting outdated supports in the future.
-
[1.12.2] Different item model for inventory/held in hand
Forge updates too fast sponge and mod writers can't keep up....
-
[1.12.2] Different item model for inventory/held in hand
I wanted to show a 2d texture in hotbar and a 3d model in my hand. But ```IFlexibleBakedModel``` and ```IPerspectiveAwareModel``` has been removed from 1.12.2. What should I do? The same needs as : https://www.minecraftforge.net/forum/topic/37633-189-different-item-model-for-inventoryheld-in-hand/
-
How to set the flight path of the dragon?
I want the dragon to go from one point to another, and the distance between the two points is probably 1000 block, But I'm breaking it down into moves of only 20 block at a time. I tried ```dragon.getNavigator().tryMoveToXYZ()```, it's always return false, even though it's only 20 blocks away. so i figured out EntityDragon override ```onLivingUpdate()``` completely. So PathNavigator.update() cannot be called. It might about the ```Phase```, It's a little difficult. I don't know what to do. I'd appreciate it if anyone could help me!!!
-
Forge Server Login Error: Missing Registries (Minecraft:dataserializers)
sorry to bumping, just want to know if i click yes what will happen
-
Color codes in Name,Description,etc..
For the same reason, green nicknames don't have enough contrast if the light is too bright
-
Can't join server, dispacther exeception
How did you solve this problem ? This does not seem to be resolved by setting timeouts
-
Too much mob generation, help me look at this code
Too much mob generation, include villager, skeleton, zombie,creeper, and villager register by mod. My server is Forge1.12.2, Sponge7.1.5 Is there any problem if I register a villager like this? Other than here, I can't think what the problem is. ``` @SubscribeEvent public void registerModel(RegistryEvent.Register<EntityEntry> event) { // event.getRegistry().register(); List<Biome> values = ForgeRegistries.BIOMES.getValues(); EntityRegistry.addSpawn(EntityVillager2.class, 1, 1, 1, EnumCreatureType.CREATURE, values.toArray(new Biome[values.size()])); } ```
-
[1.12.2]How to rotate some group of OBJ Model?
I want to rotate some group of obj, how to do that? I'm using Forge's ObjLoader, is that possible?
-
[1.12.2]Let players navigate and walk to a location automatic
That's toooo much code need copy and i don't know if it work fine, Anyway, worth a try, thank you very much!
-
[1.12.2]Let players navigate and walk to a location automatic
Now i have some idea is: 1. setvelocity 2. imitate wasd packet - above all not good idea,navigate will be very hard 3.let player ride a entityLiving that losing control of the player. But what I want most is for the player to move around
-
[1.12.2]Let players navigate and walk to a location automatic
I know EntityLiving have NavigatorHelper and MoveHelper, but EntityLivingBase not, Is a way to move player smothly to a location automatic like WASD?
-
About GLU.gluUnProject
I'm making a moba-like game where you click on the ground to find your way, now i am ungrabed the Mouse Cursor, but i don't know how to get the block pos under cursor. Can someone insprie me? The reutrn of unproject is wrong, i don't know how to get correct value. ``` GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, model); GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projection); GL11.glGetInteger(GL11.GL_VIEWPORT, viewport); if (GLU.gluUnProject(mouseX, mouseY, 1, model, projection, viewport, posFar)) { if (GLU.gluUnProject(mouseX, mouseY, 0, model, projection, viewport, posNear)) { Vec3d near = new Vec3d(posNear.get(0), posNear.get(1), posNear.get(2)); Vec3d far = new Vec3d(posFar.get(0), posFar.get(1), posFar.get(2)); RayTraceResult raytraceresult = mc.world.rayTraceBlocks(far, near); System.out.println("near:" + near.toString()); System.out.println("far:" + far.toString()); if (raytraceresult != null) { Vec3d hit = new Vec3d(raytraceresult.hitVec.x, raytraceresult.hitVec.y, raytraceresult.hitVec.z); System.out.println(hit.toString()); } } } } ```
-
[1.12.2-2768]ServerHello cannot be cast to RegistryData
env: proxy: waterfall forge: 1.12.2 2768 spongeforge: 1.12.2 2768-7.15 java.lang.ClassCastException: net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ServerHello cannot be cast to net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$RegistryData Sometimes error when i use waterfall channel message connect player to another server. i submitted issue at Waterfall's github, but he say not interest in dealing with this issue. And i was commented all channel message send code. it's happed too. I try to use Velocity(another proxy) instead of Waterfall, the error doesn't reappear, but Velocity seems to be a more deadly bug. issue page: https://github.com/MinecraftForge/MinecraftForge/issues/4285
-
[1.12.2]How to register new villager and trade?
I'm looking a way to register new villager and trade, but VillagerRegister#reigster is private method, anyone can help me ? Thank you!
-
How to make simple, smooth 2d animation? (detailed)
1. override drawRect method that all use double parameter 2. add partialTick even if i used the two methods , it doesn't not very smooth.
-
How to make simple, smooth 2d animation? (detailed)
Sorry to reply to such an old thread, I just want to know how did you solve this problem? beacause i meet the problem now, and I think this is a problem related to opengl setting, like resolution, viewport or glOrtho.
-
How to using same blockStates json for Item?
I'm very thank you for you ,i can extends ResourceLocation and overrider hashCode method, is you ,give me inspiration,thanks again.
-
How to using same blockStates json for Item?
Sorry,I forget attach forge version ,it's 1.12.2. I have 10 item,every item was render by the same obj model. so, when i foreach every item call ModelLoader#setCustomModelResourceLocation(item, meta, new ModelResourceLocation( "mfbl:share_obj_blockstates.json"), the "ModelLoader#setCustomModelResourceLocation" method will put ModelResourceLocation("mfbl:share_obj_blockstates.json") to a map, the map will equal "mfbl:share_obj_blockstates.json" if exist. The mechanism not allow different item use share same blockstates.json. the mechanism lead just first register item was render normally,other item was render by missing model instead of. What should i do?My English is not good,if i describe not clearly, please point out.
-
How to using same blockStates json for Item?
Forge version: 1.12.2 My demand is: all of my mod item ,using same obj model, using different obj according different itemMeta. And, all of my mod item using same blockState.json. that my clientProxy#preInit code : for (Item item : ModItems.itemList) { for (int i = 0; i < 10; i++) { ModelLoader.setCustomModelResourceLocation(item, i, new ModelResourceLocation("mfbl:staff_" + i, "inventory")); System.out.println("mfbl:staff_" + i + "," + item.getUnlocalizedName() + "," + item.getRegistryName()); } } Qustion is: When i call ModelLoader#setCustomModelResourceLocation for each item reigster the same modelResourceLocation, then source code put it into customModels map ,the map will equal the Pair#hashcode that from item.delegate and metadata. follow this : public static void setCustomModelResourceLocation(Item item, int metadata, ModelResourceLocation model) { customModels.put(Pair.of(item.delegate, metadata), model); ModelBakery.registerItemVariants(item, model); } I found the code in item.delegate , the 'name' is ModelResourceLocation#path: @Override public int hashCode() { return Objects.hashCode(name); } so,just first item register obj normally.I'm create 10 item that render by obj. now i have 1 blockStates json, I want the 10 item share the same blockStates json, how to do ? edit: I found some thread about StateMapperBase, but it's only aim at block.it's no use for me.
IPS spam blocked by CleanTalk.