Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Everything posted by AntonBespoiasov

  1. Forge version: 28.0.17 Minecraft version: 1.14.4 Java: 1.8 64-bit OS: Windows 10 64-bit What I did: 1. I installed Forge installer from Forge's site. 2. Ran it and installed "forged" server in an empty folder. 3. I launched vanilla server jar(*minecraft_server.1.14.4.jar*), stopped it, accepted the EULA and ran the server again. 4. Then I ran the "forged" server jar(*forge-1.14.4-28.0.17.jar*) with the arguments shown in the console output below. It fails with the *java.lang.UnsupportedOperationException* exception. It was supposed to
  2. Creating multiblock system I decided that I will store original blockstate in TEs of blocks of a multiblock because my multiblocks are pretty dynamic and some 3-dimensional array storing their structure wouldn't work. This blockstate will replace corresponding block of the multiblock with itself when the multiblock is dissassembled(some of its blocks are destroyed). But I don't know if each block in the world is unique blockstate or just reference to certain blockstate. Doing some researches I came across StateContainer that is filled with blockstates in constructor of Block and stored th
  3. The multiblocks are pretty similar to those ones in Immersive Engineering. They can be rotated(but not mirrored yet), they look like solid machine and blocks of resulting multiblock mostly don't look similar to blocks that have stood on their places before the multiblock was formed. Clicking on different blocks of multiblock may trigger different actions. There will also be different additions to multiblock: items input/output block, pattern chest and pattern creator(they allow you to put some recipe in the machine they attached to and then perform this recipe automatically, like that crafting
  4. My mod uses master-slave multiblock system. But I still don't know how should the multiblock be rendered. I have some possible solutions for this problem: Each block of a multiblock stores ID of its model as property of block state. Then using blockstate JSON files I can map corresponding models to corresponding block of multiblock. Here comes another question: should each multiblock have its own implementation of slave and master, just its own instances of an existing implementation of slave and master or one instance of each implementation of slave and master will be used for all multi
  5. public class UnderInstrumentsConstructionTileEntity extends ModTileEntity { public static TileEntityType<UnderInstrumentsConstructionTileEntity> TYPE; public BlockState state; public UnderInstrumentsConstructionTileEntity(TileEntityType<?> tileEntityTypeIn) { super(TYPE); } @Override public CompoundNBT writeData(CompoundNBT nbt) { // TODO Auto-generated method stub return null; } @Override public void readData(CompoundNBT nbt) { // TODO Auto-generated method stub } class ThisTER extends TileEntityRenderer<UnderInstrumentsConstructionTileEntit
  6. Some methods, classes, fields and etc.(symbols) names are replaced with unreadable names that look like combination of symbol type and its number. Below I listed some of them(there are much more) : com.mojang.blaze3d.matrix.MatrixStack: net.minecraft.block.Block: And my favorite one that turns rendering into hell and where all method and field names are wrong - com.mojang.blaze3d.platform.GLStateManager: How to fix this? I have already written some code using the wrong symbol names can I automatically replace references to them in my code with normal wh
  7. assets/uc_auramagic/recipes/experience_shard.json: { "type": "uc_auramagic:experience_shard" }
  8. public class RecipeExperienceShard extends SpecialRecipe { public static SpecialRecipeSerializer<RecipeExperienceShard> SERIALIZER = IRecipeSerializer.register(Auramagic.prefix("experience_shard"), new SpecialRecipeSerializer<RecipeExperienceShard>(RecipeExperienceShard::new)); public RecipeExperienceShard(ResourceLocation idIn) { super(idIn); } @Override public boolean matches(CraftingInventory inv, World worldIn) { EnumExperienceColor kind = null; int j = 0; for (int i = 0; i < inv.getSizeInventory(); i++) { ItemStack cur = inv.getStackInSlot(i
  9. I have a bunch of items where all items must use the same model but each item in this bunch has different registry name. In 1.15 an item automatically gets model location assigned to it(by registry name of the item), but I would want to change the model location assigned to the item by default.
  10. Before 1.14 I could simply click debug button in Eclipse and it would run Minecraft with my mod, in this case I could do step debugging, pause everything, view threads and etc. But in new version to run Minecraft with my mod I need to run gradlew runClient. It runs perfectly but I can't debug it. Maybe I need to attach Minecraft process to Java debugger somehow.
  11. I overrode getRemainingItems with code from net.minecraft.item.crafting.RecipeRepairItem. The code simply tries to get container from items that lie on the crafting grid. But it didn't help. Also I solved the NBT problem. New code is in the first post of the topic with the implementation of getRemainingItems and new NBT setting code.
  12. public class OreFinderBindOre extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe { public OreFinderBindOre() { setRegistryName(References.MOD_ID + ":ore_finder_bind_ore"); } @Override public boolean matches(InventoryCrafting inv, World worldIn) { ItemStack oreFinder = null; ItemStack ore = null; for (int i = 0; i < inv.getSizeInventory(); i++) { ItemStack cur = inv.getStackInSlot(i); if (cur.getItem() == Main.ORE_FINDER) { if (oreFinder != null) return false; oreFinder = cur; } else if (cur.getItem() instanceof ItemBlock) {
  13. Why does crafting logic happen always in the getCratingResult method? When are they invoked and for what purpose?
  14. After running gradlew eclipse in my project directory Eclipse said me that type String is missing. Removing and adding JRE from buid path didn't help
  15. Redstone uses IBlockColor to change color depending on power. It multiplies color of specified tint index. What's the number of redstone color multiplier per one power unit of redstone?
  16. /** Decreases player's experience properly */ public static void decreaseExp(EntityPlayer player, float amount) { if (player.experienceTotal - amount <= 0) { player.experienceLevel = 0; player.experience = 0; player.experienceTotal = 0; return; } player.experienceTotal -= amount; if (player.experience * (float)player.xpBarCap() <= amount) { amount -= player.experience * (float)player.xpBarCap(); player.experience = 1.0f; player.experienceLevel--; }
  17. I solved this problem. And I did it in pretty weird way. I add entity = worldIn.getEntityByID(entity.getEntityId()) after getting entity with ModMath.getMouseOver(…). The problem was in ModMath.getMouseOver(…).
  18. Can I just change ModMath.getMouseOver(…) to make it be able to work only on server. And put everything in if (!worldIn.isRemote). Will it work?
  19. public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) { Entity entity = ModMath.getMouseOver(Minecraft.getMinecraft().getRenderPartialTicks(), 0); // Gets entity that entityLiving is looking at if (entity != null && entity instanceof EntityLiving) { ((EntityLiving)entity).attackEntityFrom(DamageSource.MAGIC, 2.0f); ((EntityLiving)entity).setRevengeTarget(entityLiving); } return stack; } Using item that has the implementation of the method above doesn't damage entity. Debugging it showed that attackEntityFrom() is
  20. Playing with Thaumcraft I noticed that non-vanilla and non-Thaumcraft items and blocks can be smelt in Alchemical Furnace to make liquid aspects. So how can I add this feature to items and blocks from my mod? Or aspects of non-vanilla and non-Thaumcraft items and blocks are only defined in Thaumcraft?
  21. I have a block that mustn't be counted when piston counts blocks for pushing limit.But I don't know how to implement this feature. I've got an idea that I can move block using methods of block. I.e if there is a method that is called right before piston pushes blocks and that receives information about the push I can move block from this method before the piston. That means that piston won't count this block while trying to push the blocks. Another idea isn't related to "method that is triggered when piston pushes blocks". This idea is about overriding piston and its behavior. I can someh
  22. Your project path mustn't contain spaces. Also run gradlew cleancache --refresh-dependencies setupDecompWorkspace eclipse in folder of the project. To do that create new .txt file, paste this command there and save this .txt file in the project folder as .bat file and run. Or use command prompt in folder to run the command. Then run gradlew.bat file again(this file must be in project folder by default). Don't forget to specify *project folder*/eclipse as workspace when you launch Eclipse(or whatever IDE you use).
  23. Some food from some mods have different speed of being eaten. How can I make this feature?
  24. How can I override IForgeItem#getAttributeModifiers(EquipmentSlotType, ItemStack) if Minecraft will still return common ItemStack. And I didn't find IForgeItem in Forge with C+SHIFT+H.
  25. I want my items to store different kind of data, storing this data in NBT or metadata is very unoptimized. So I want to override ItemStacks that my item will return when the item is crafted, picked up, picked from creative tab and etc. Also I would like to know how to do the same thing with block states.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.