Jump to content

Recommended Posts

Posted

There is a switch in the GUI of the block. When switching, a packet is sent to the server with the switch values and the block position. When the server receives the packet, it sets the value in TileEntity by position and synchronizes it with the world.notifyBlockUpdate. NBT is normally written and read from the server and client, I checked using system.out.println in update. But if I re-enter the world, then NBT is considered a different meaning. While trying to understand why this is, I noticed that in the game pause sometimes writeToNBT from TileEntity is not called. When writeToNBT is called when paused, when you re-enter the world, NBT is read out normally. (If something is not clear, then ask me, because my English is at the level of a google translator)
 

GUI (The method of clicking on the switch is onMouseClicked in framePrivate):

Spoiler

public class FcGui extends GuiContainer{
    private ArrayList<Button> buttons = new ArrayList<Button>();
    private Slider slider;
    private FrameOfModules frame;
    private PrivateFrame framePrivate;
    private EnergyProgressBar bar;
    private FieldIndicator indicator;
    private IInventory playerInv;
    private TileEntityFC te;

    public FcGui(IInventory playerInv, final TileEntityFC te) {
        super(new FcContainer(playerInv, te));

        this.playerInv = playerInv;
        this.te = te;

        this.xSize = 196;
        this.ySize = 200;

        frame = new FrameOfModules(3, Module.getLocalizedNames(te.getAcceptedModules()));
        framePrivate = new PrivateFrame() {
            @Override
            public void onMouseClicked(boolean isPublic) {
                if (isPublic)
                    te.setPublic();
                else
                    te.setPrivate();
                NetworkHandler.sendToServer(new PacketPublicPrivate(te.getPos(), isPublic));
                ((FcContainer)inventorySlots).changeSlots(isPublic);
            }
        };
        bar = new EnergyProgressBar(true);
        slider = new Slider(7, 83, 20) {
            @Override
            public void onSliderPosChanged(int sliderPos) {
                if (te.getFrequency() != sliderPos) {
                    NetworkHandler.sendToServer(new PacketFrequency(te.getPos(), sliderPos));
                    te.setFrequency(sliderPos);
                }
            }
        };

        ResourceLocation b_r = new ResourceLocation("meem:textures/gui/buttons/left_right/button_right.png");
        ResourceLocation b_r_h = new ResourceLocation("meem:textures/gui/buttons/left_right/button_right_hover.png");
        ResourceLocation b_r_c = new ResourceLocation("meem:textures/gui/buttons/left_right/button_right_click.png");
        ResourceLocation b_l = new ResourceLocation("meem:textures/gui/buttons/left_right/button_left.png");
        ResourceLocation b_l_h = new ResourceLocation("meem:textures/gui/buttons/left_right/button_left_hover.png");
        ResourceLocation b_l_c = new ResourceLocation("meem:textures/gui/buttons/left_right/button_left_click.png");

        buttons.add(new Button(9, 16, 66, 35, b_r, b_r_h, b_r_c) {
            @Override
            public void onButtonClicked() {
                int radius = te.getRadius() + (isShiftKeyDown() ? 10 : 1);
                if (radius > te.getMaxRadius())
                    te.setRadius(te.getMaxRadius());
                else
                    te.setRadius(radius);
                NetworkHandler.sendToServer(new PacketFieldCreator(te.getPos(), te.getVoltage(), te.getRadius()));
            }
        });
        buttons.add(new Button(9, 16, 17, 35, b_l, b_l_h, b_l_c) {
            @Override
            public void onButtonClicked() {
                int radius = te.getRadius() - (isShiftKeyDown() ? 10 : 1);
                if (radius < 1)
                    te.setRadius(1);
                else
                    te.setRadius(radius);
                NetworkHandler.sendToServer(new PacketFieldCreator(te.getPos(), te.getVoltage(), te.getRadius()));
            }
        });
        indicator = new FieldIndicator(7, 6);
    }

    @Override
    protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
        GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
        this.mc.getTextureManager().bindTexture(new ResourceLocation("meem:textures/gui/fcgui.png"));
        this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize-20, this.ySize);
        frame.draw(mc, 177 + guiLeft, guiTop, mouseX, mouseY);
        framePrivate.drawFrame(mc, guiLeft - 26, guiTop, te.isPublic());
    }

    @Override
    protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
        super.mouseClicked(mouseX, mouseY, mouseButton);
        for (int i = 0; i < buttons.size(); i++)
            buttons.get(i).mouseDown(mouseX - getGuiLeft(), mouseY - getGuiTop());
        slider.mouseDown(mouseX - getGuiLeft(), mouseY - getGuiTop());
        framePrivate.mouseDown();
    }

    @Override
    protected void mouseReleased(int mouseX, int mouseY, int state) {
        super.mouseReleased(mouseX, mouseY, state);
        for (int i = 0; i < buttons.size(); i++)
            buttons.get(i).mouseUp(mouseX - getGuiLeft(), mouseY - getGuiTop());
    }

    @Override
    protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) {
        super.mouseClickMove(mouseX, mouseY, clickedMouseButton, timeSinceLastClick);
        slider.mousePressed(mouseX - getGuiLeft(), mouseY - getGuiTop());
    }

    @Override
    protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
        this.fontRendererObj.drawString("Field Converter", 88 - this.fontRendererObj.getStringWidth("Field Converter") / 2, 6, 4210752);            //#404040

        fontRendererObj.drawString("Information:", 85, 20, 4210752);
        String[] info = te.getModuleInfo();
        if (info != null)
            for (int i = 0; i < info.length; i++)
                fontRendererObj.drawString(info[i], 85, 30 + i * 10, 4210752);
        else {
            fontRendererObj.drawString("No functional", 85, 30, 4210752);
            fontRendererObj.drawString("module", 85, 40, 4210752);
        }

        fontRendererObj.drawString("Radius", 30, 27, 4210752);
        fontRendererObj.drawString(te.getRadius()+"", 46 - fontRendererObj.getStringWidth(te.getRadius()+"")/2, 40,4210752);

        fontRendererObj.drawString("Frequency", 88 - this.fontRendererObj.getStringWidth("Frequency") / 2, 65, 4210752);
        fontRendererObj.drawString((float)te.getFrequency()/2f+" Hz", 120, 80, 4210752);

        for (int i = 0; i < buttons.size(); i++)
            buttons.get(i).draw(mc, mouseX - getGuiLeft(), mouseY - getGuiTop());
        slider.draw(mc, te.getFrequency());
        indicator.draw(mc, te.hasField());
        bar.draw(mc, 7, 99, mouseX - guiLeft, mouseY - guiTop, te.getVoltage(), te.getMaxVoltage());
        framePrivate.draw(mc, -26, 0, mouseX - guiLeft, mouseY - guiTop, te.isPublic());
    }

    @Override
    public boolean doesGuiPauseGame() {
        return false;
    }
}

 

 

Packet Class:

Spoiler

public class PacketPublicPrivate extends AbstractPacket<PacketPublicPrivate> {
    protected BlockPos pos;
    protected boolean isPublic;

    public PacketPublicPrivate(){}

    public PacketPublicPrivate(BlockPos pos, boolean isPublic){
        this.pos = pos;
        this.isPublic = isPublic;
    }

    @Override
    public void toBytes(final ByteBuf buf) {
        buf.writeBoolean(isPublic);
        buf.writeInt(pos.getX());
        buf.writeInt(pos.getY());
        buf.writeInt(pos.getZ());
    }

    @Override
    public void fromBytes(final ByteBuf buf) {
        isPublic = buf.readBoolean();
        int m, n, b;
        m = buf.readInt();
        n = buf.readInt();
        b = buf.readInt();
        pos = new BlockPos(m, n, b);
    }

    @Override
    public void handleClientSide(PacketPublicPrivate message, EntityPlayer player) {
    }

    @Override
    public void handleServerSide(PacketPublicPrivate message, EntityPlayer player) {
        IPublicPrivateHandler te = (IPublicPrivateHandler) player.world.getTileEntity(message.pos);
        if (message.isPublic)
            te.setPublic();
        else
            te.setPrivate();
    }
}

public abstract class AbstractPacket<REQ extends IMessage> implements IMessage, IMessageHandler<REQ, REQ>
{
    @Override
    public REQ onMessage(final REQ message, final MessageContext ctx)
    {
        if(ctx.side == Side.SERVER)
        {
            System.out.println("PacketToServer");
            handleServerSide(message, ctx.getServerHandler().playerEntity);
        }
        else
        {
            System.out.println("PacketToClient");
            handleClientSide(message, FMLClientHandler.instance().getClientPlayerEntity());
        }
        return null;
    }

    public abstract void handleClientSide(final REQ message, final EntityPlayer player);
    public abstract void handleServerSide(final REQ message, final EntityPlayer player);
}

 

 

TileEntity:

Spoiler

public class TileEntityFC extends FieldReceiverEnergyStandart implements IInventory, IModuleProvider, IFieldCreator, IPublicPrivateHandler, ITickable {

    protected boolean active;
    protected ItemStack[] inventory;
    protected String customName;
    protected int radius;
    protected int maxRadius;
    protected int lossReduce;
    protected int[] ids;

    public TileEntityFC(){
        this.maxVoltage = 150;
        this.maxRadius = 10;
        radius = 1;
        this.frequency = 0;
        inventory = new ItemStack[]{ItemStack.EMPTY, ItemStack.EMPTY, ItemStack.EMPTY, ItemStack.EMPTY, ItemStack.EMPTY, ItemStack.EMPTY,ItemStack.EMPTY, ItemStack.EMPTY};
        active = true;
    }
    @Override
    public void update(){
        System.out.println("isPublic: " + isPublic());
    }

    @Override
    public boolean isWork() {
        return active && hasFuncModule();
    }

    @Override
    public void onField(){
        ItemStack stack = getFuncModule();
        if (!stack.isEmpty())
            ((ModuleFunctional)stack.getItem()).firstUpdate(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids));
        createField();
    }

    @Override
    public int getSizeInventory() {
        return 8;
    }

    @Override
    public boolean isEmpty(){
        boolean result = true;
        for (int i = 0; i < inventory.length; i++)
            if (inventory[i] != ItemStack.EMPTY) {
                result = false;
                break;
            }
        return result;
    }

    @Override
    public ItemStack getStackInSlot(int index) {
        if (index < 0 || index >= this.getSizeInventory())
            return ItemStack.EMPTY;
        return this.inventory[index];
    }

    @Override
    public ItemStack decrStackSize(int index, int count) {
        if (!this.getStackInSlot(index).isEmpty()) {
            ItemStack itemstack;

            if (this.getStackInSlot(index).getCount() <= count) {
                itemstack = this.getStackInSlot(index);
                this.setInventorySlotContents(index, ItemStack.EMPTY);
                this.markDirty();
                return itemstack;
            } else {
                itemstack = this.getStackInSlot(index).splitStack(count);

                if (this.getStackInSlot(index).getCount() <= 0) {
                    this.setInventorySlotContents(index, ItemStack.EMPTY);
                } else {
                    //Just to show that changes happened
                    this.setInventorySlotContents(index, this.getStackInSlot(index));
                }

                this.markDirty();
                return itemstack;
            }
        } else {
            return ItemStack.EMPTY;
        }
    }

    @Override
    public ItemStack removeStackFromSlot(int index) {
        ItemStack result = inventory[index].copy();
        if (inventory[index].getItem() instanceof ModuleFunctional)
            ((ModuleFunctional)inventory[index].getItem()).removeModule(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids));
        inventory[index] = ItemStack.EMPTY;
        this.markDirty();
        return result;
    }

    @Override
    public void setInventorySlotContents(int index, ItemStack stack) {
        if (index < 0 || index >= this.getSizeInventory())
            return;

        if (!stack.isEmpty() && stack.getCount() > this.getInventoryStackLimit())
            stack.setCount(this.getInventoryStackLimit());

        if (!isEmpty() && stack.getCount() == 0)
            stack = ItemStack.EMPTY;

        this.inventory[index] = stack;
        this.markDirty();
        if (stack.getItem() instanceof ModuleFunctional)
            ((ModuleFunctional)stack.getItem()).putModule(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids));
    }

    @Override
    public int getInventoryStackLimit() {
        return 64;
    }

    @Override
    public boolean isUsableByPlayer(EntityPlayer player) {
        return this.world.getTileEntity(this.getPos()) == this && player.getDistanceSq(this.pos.add(0.5, 0.5, 0.5)) <= 64;
    }

    @Override
    public void openInventory(EntityPlayer player) {
        markUpdate();
        ItemStack stack = getFuncModule();
        if (!stack.isEmpty())
            ((ModuleFunctional)stack.getItem()).openInventory(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids));
    }

    @Override
    public void closeInventory(EntityPlayer player) {
        markUpdate();
        ItemStack stack = getFuncModule();
        if (!stack.isEmpty())
            ((ModuleFunctional)stack.getItem()).closeInventory(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids));
    }

    @Override
    public boolean isItemValidForSlot(int index, ItemStack stack) {
        return isAccepted(stack.getItem()) && (stack.getItem() instanceof ModuleFunctional ? !hasFuncModule() : true);
    }

    @Override
    public int getField(int id) {
        return 0;
    }

    @Override
    public void setField(int id, int value) {

    }

    @Override
    public int getFieldCount() {
        return 0;
    }

    @Override
    public void clear() {
        for (int i = 0; i < inventory.length; i++)
            inventory[i] = ItemStack.EMPTY;
        this.markDirty();
    }

    @Override
    public String getName() {
        return this.hasCustomName() ? this.customName : "container.tile_entity_FC";
    }

    @Override
    public boolean hasCustomName() {
        return this.customName != null && !this.customName.equals("");
    }

    public String getCustomName() {
        return this.customName;
    }

    public void setCustomName(String customName) {
        this.customName = customName;
    }

    @Override
    public NBTTagCompound getUpdateTag() {
        return writeToNBT(new NBTTagCompound());
    }

    @Override
    @Nullable
    public SPacketUpdateTileEntity getUpdatePacket() {
        return new SPacketUpdateTileEntity(getPos(), 4, getUpdateTag());
    }

    @Override
    public void onDataPacket(net.minecraft.network.NetworkManager net, net.minecraft.network.play.server.SPacketUpdateTileEntity pkt) {
        readFromNBT(pkt.getNbtCompound());
    }

    @Override
    public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
        super.writeToNBT(nbt);


        if (ids != null){
            nbt.setBoolean("isPublic", false);
            nbt.setIntArray("ids", ids);
        }
        else
            nbt.setBoolean("isPublic", true);

        nbt.setBoolean("isActive", active);
        nbt.setInteger("FieldMaxRadius", maxRadius);
        nbt.setInteger("FieldRadius", radius);
        nbt = writeToNBTFieldStats(nbt);

        NBTTagList list = new NBTTagList();
        for (int i = 0; i < this.getSizeInventory(); ++i) {
            if (!this.getStackInSlot(i).isEmpty()) {
                NBTTagCompound stackTag = new NBTTagCompound();
                stackTag.setByte("Slot", (byte) i);
                this.getStackInSlot(i).writeToNBT(stackTag);
                list.appendTag(stackTag);
            }
        }
        nbt.setTag("Items", list);

        if (this.hasCustomName()) {
            nbt.setString("CustomName", this.getCustomName());
        }
        return nbt;
    }

    @Override
    public void readFromNBT(NBTTagCompound nbt) {
        super.readFromNBT(nbt);

        if (!nbt.getBoolean("isPublic")) {
            ids = nbt.getIntArray("ids");
        }
        else
            ids = null;

        active = nbt.getBoolean("isActive");
        maxRadius = nbt.getInteger("FieldMaxRadius");
        radius = nbt.getInteger("FieldRadius");
        readFromNBTFieldStats(nbt);

        NBTTagList list = nbt.getTagList("Items", 10);
        for (int i = 0; i < list.tagCount(); ++i) {
            NBTTagCompound stackTag = list.getCompoundTagAt(i);
            int slot = stackTag.getByte("Slot") & 255;
            //this.setInventorySlotContents(slot, new ItemStack(stackTag));
            inventory[slot] = new ItemStack(stackTag);
        }
        if (nbt.hasKey("CustomName", 8)) {
            this.setCustomName(nbt.getString("CustomName"));
        }
    }

    @Override
    public void updateValueModules(){
        int cVoltage = 0;
        int cRadius = 0;
        int cLossReduction = 0;

        for (int i = 1; i < inventory.length; i++)
            if (inventory[i] != ItemStack.EMPTY){
                if (inventory[i].getItem() instanceof ItemVoltageModule)
                    cVoltage += inventory[i].getCount();
                else if (inventory[i].getItem() instanceof ItemRadiusModule)
                    cRadius += inventory[i].getCount();
                else if (inventory[i].getItem() instanceof ItemLossReductionModule)
                    cLossReduction += inventory[i].getCount();
            }

        maxVoltage = 150 + 150 * cVoltage;
        maxRadius = 10 + 5 * cRadius;
        lossReduce = cLossReduction;
        try {
            if (voltage > maxVoltage)
                setVoltage(maxVoltage);
            if (radius > maxRadius)
                setRadius(maxRadius);
        }
        catch (NullPointerException e){System.out.println("Try to save, when world did not loaded");}
    }

    @Override
    public boolean isAccepted(Item item) {
        Item[] items = getAcceptedModules();
        for (int i = 0; i < items.length; i++)
            if (items[i].equals(item))
                return true;
        return false;
    }

    @Override
    public Item[] getAcceptedModules() {
        return new Item[]{
            ModItems.voltageModule,
            ModItems.lossReduceModule,
            ModItems.radiusModule,
            ModItems.lifeModule,
            ModItems.electricalModule,
            ModItems.aggressiveModule,
            ModItems.strangeModule,
            ModItems.luckModule
        };
    }

    @Override
    public int getModuleCount() {
        return 3;
    }

    public boolean hasFuncModule(){
        for (int i = 0; i < inventory.length; i++)
            if (inventory[i].getItem() instanceof ModuleFunctional)
                return true;
        return false;
    }

    public ItemStack getFuncModule(){
        for (int i = 0; i < inventory.length; i++)
            if (inventory[i].getItem() instanceof ModuleFunctional)
                return inventory[i];
        return ItemStack.EMPTY;
    }

    @Override
    public void createField() {
        ItemStack stack = getFuncModule();
        if (!stack.isEmpty())
            ((ModuleFunctional)stack.getItem()).lastUpdate(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids));
    }

    @Override
    public int getMaxRadius() {
        return maxRadius;
    }

    @Override
    public int getRadius() {
        return radius;
    }

    @Override
    public void setRadius(int radius) {
        this.radius = radius;
        ItemStack stack = getFuncModule();
        if (!stack.isEmpty())
            ((ModuleFunctional)stack.getItem()).changeRadius(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids));
    }

    public void setActive(boolean active) {
        this.active = active;
        ItemStack stack = getFuncModule();
        if (!stack.isEmpty())
            ((ModuleFunctional)stack.getItem()).changeActive(new FuncArgs(world, getPos(), radius, voltage, lossReduce, isPublic(), ids), active);
    }

    public boolean getActive(){
        return active;
    }

    public String[] getModuleInfo(){
        ItemStack stack = getFuncModule();
        if (!stack.isEmpty())
            return ((ModuleFunctional)stack.getItem()).getInfo();
        return null;
    }

    @Override
    public void cardsChanged() {
        if (!isPublic())
            setPrivate();
    }

    @Override
    public void setPrivate() {
        int[] toArray = new int[5];
        for (int i = 0; i < 5; i++)
            if (!inventory[i].isEmpty()) {
                try { toArray[i] = inventory[i].getTagCompound().getInteger("id"); }
                catch (NullPointerException e){ toArray[i] = 0; }
            }
        ids = toArray;
        markUpdate();
    }

    @Override
    public void setPublic() {
        ids = null;
        markUpdate();
    }

    @Override
    public boolean isPublic() {
        return ids == null;
    }
}

 

TileEntity parent:

Spoiler

public abstract class FieldReceiverEnergyStandart extends TileEntity implements IFieldReceiverEnergy {

    protected BlockPos link;
    protected int voltage;
    protected int maxVoltage;
    protected int frequency;

    @Override
    public void applyStats(int voltage) {
        this.voltage = voltage;
        if (voltage > maxVoltage)
            exceedingVoltage(voltage);
        markUpdate();
    }

    @Override
    public void applyCreatorsAround(){
        List<TileEntity> tes = EventsHandler.radiusFilter(getPos(), world.loadedTileEntityList, 100);
        for (int i = 0; i < tes.size(); i++) {
            if (tes.get(i) instanceof IFieldCreatorEnergy)
                ((IFieldCreatorEnergy) tes.get(i)).applyLinkedBlocks();
        }
    }

    @Override
    public abstract boolean isWork();

    @Override
    public abstract void onField();

    @Override
    public int getVoltage(){ return voltage; }

    @Override
    public int getMaxVoltage() {
        return maxVoltage;
    }

    @Override
    public int getFrequency(){ return frequency;}

    @Override
    public BlockPos getLink(){
        return link;
    }

    @Override
    public void setLink(BlockPos pos){
        if (pos == null)
            voltage = 0;
        link = pos;
        markUpdate();
    }

    @Override
    public boolean hasField(){
        return link != null;
    }

    @Override
    public void setFrequency(int frequency){
        this.frequency = frequency;
        applyCreatorsAround();
        markUpdate();
    }

    @Override
    public void setVoltage(int voltage){
        this.voltage = voltage;
        markUpdate();
    }

    public void exceedingVoltage(int voltage){
        if (link != null)
            ((IFieldCreatorEnergy)world.getTileEntity(link)).brokeLink(getPos());
        world.createExplosion(new EntityEgg(world, getPos().getX(), getPos().getY(), getPos().getZ()), getPos().getX(), getPos().getY(), getPos().getZ(), voltage/maxVoltage, true);
    }

    protected void markUpdate(){
        world.notifyBlockUpdate(getPos(), getBlockType().getDefaultState(), getBlockType().getDefaultState(), 0);
    }

    public NBTTagCompound writeToNBTFieldStats(NBTTagCompound nbt){
        if (hasField()) {
            nbt.setBoolean("HasLink", true);
            nbt.setInteger("LinkX", link.getX());
            nbt.setInteger("LinkY", link.getY());
            nbt.setInteger("LinkZ", link.getZ());
        }
        else
            nbt.setBoolean("HasLink", false);

        nbt.setInteger("FieldVoltage", voltage);
        nbt.setInteger("FieldMaxVoltage", maxVoltage);
        nbt.setInteger("FieldFrequency", frequency);
        return  nbt;
    }

    public void readFromNBTFieldStats(NBTTagCompound nbt){
        if (nbt.getBoolean("HasLink")){
            link = new BlockPos(nbt.getInteger("LinkX"), nbt.getInteger("LinkY"), nbt.getInteger("LinkZ"));
        }
        else
            link = null;
        voltage = nbt.getInteger("FieldVoltage");
        maxVoltage = nbt.getInteger("FieldMaxVoltage");
        frequency = nbt.getInteger("FieldFrequency");
    }
}

 

Posted

I can't see what's wrong.

I don't like the way you've constructed your packet class (or its name), but it looks like it's doing safe things and as far as I can tell the TE is correctly saving its data to disk and reading it back again. So I'm not really sure what's up.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
14 minutes ago, Draco18s said:

I can't see what's wrong.

I don't like the way you've constructed your packet class (or its name), but it looks like it's doing safe things and as far as I can tell the TE is correctly saving its data to disk and reading it back again. So I'm not really sure what's up.

The most interesting thing is that only "isPublic" is reset. All other values are perfectly readable when you re-enter the world

Posted

Ah!

 

        if (!nbt.getBoolean("isPublic")) {
            ids = nbt.getIntArray("ids");
        }
        else
            ids = null;

 

You never set the isPublic field. You read the bool from the nbt and do the right thing reading more data,  but you never set the field. 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)
4 hours ago, Draco18s said:

Ah!

 


        if (!nbt.getBoolean("isPublic")) {
            ids = nbt.getIntArray("ids");
        }
        else
            ids = null;

 

You never set the isPublic field. You read the bool from the nbt and do the right thing reading more data,  but you never set the field. 

I do not have an isPublic field. IsPublic is used as a key to understand whether ids are null or not. Therefore, everything should work.  And I just realized that my NBT has stopped working on all the blocks. There are no exceptions. Because of what it can happen?

Edited by Minebot1708
Posted (edited)
1 hour ago, Jay Avery said:

There's no isPublic field, so what do you mean by this?

 

This is key in NBTTagCompound. In any case, I further wrote that NBT generally ceased to work everywhere. Something is wrong with my code :)

Edited by Minebot1708
Posted

What exactly do you mean by NBT stopped working? What do you find in the debugger? Are the read/write methods being called? Are the values null or incorrect? What was the last thing you changed before the problem started?

Posted
7 hours ago, Jay Avery said:

What exactly do you mean by NBT stopped working? What do you find in the debugger? Are the read/write methods being called? Are the values null or incorrect? What was the last thing you changed before the problem started?

I will give an example of a bug. I go into the world, in the GUI of the blocks I change the variables. These variables are normally synchronized between the client and the server. If I get out of the world, and then come back, then those changes to the variables that I did will not happen. That is, the readFromNBT method will load those values of the variables that were during the  the last login in world, without taking my changes into account. But sometimes all the same readFromNBT loads the correct data when entering the world. In the debugger, I realized that when data is not synchronized during a restart, then when write-out of the world, writeToNBT is not called. When there is no bug, then before the last exit from the world, writeToNBT is called.
Null is nowhere to be found. Before the advent of this problem, I made that switch and added two variables to read / write. And I'll add that can not be called writeToNBT only for my TileEntity. When a bug occurs, TileEntity of vanilla does not suffer. At least in the chests things are save

Posted
8 hours ago, Minebot1708 said:

The problem was that I did not call markDirty

markDirty is still around in 1.11.2? I thought we were supposed to change to some other method name about an update, or am I misremembering a different class?

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted (edited)
18 minutes ago, jeffryfisher said:

markDirty is still around in 1.11.2?

TileEntity::markDirty is indeed still around, even in 1.12(and I checked - it does the same thing). It marks the chunk it is in as "dirty(1.12 name)/modified(1.11.x name)" aka "needs to be saved to disk as there were changes" and updates the comparator output for the block.

Edited by V0idWa1k3r

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • game still crashed so I decided to check the log myself this time and found out the Xaphan was also invalid. disabling both of them fixed the crash issue. buuuut turns out the latest version of the mod also has animation bug, so I'll just have to downgrade... :')
    • Im playing RlCraft, im about 80+ hours in the game and It started to randomly crash in certain areas. This is the crash log It gives me: https://mclo.gs/H1zdyjG Any Idea what is going on? and if It can be fixed? Thanks  
    • hello, when launching my modded minecraft server (1.20.1) in Fabric, my server constantly reboots with this error  if you have any questions or solutions I will get back to you as soon as possible. sorry, my English is pretty bad     [00:40:24] [main/ERROR]: A mod crashed on startup! net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'spectrelib' at 'com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod'!         at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:162) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) ~[fabric-server-launcher.jar:1.0.1] Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'spectrelib' at 'com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod'!         at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:403) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:401) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'spectrelib' due to errors, provided by 'veinmining'!         at com.illusivesoulworks.spectrelib.EntrypointUtils.lambda$invokeEntrypoints$0(EntrypointUtils.java:25) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.gatherExceptions(EntrypointUtils.java:41) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:25) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.util.ServiceConfigurationError: com.illusivesoulworks.veinmining.common.platform.services.IPlatform: com.illusivesoulworks.veinmining.platform.FabricPlatform Unable to get public no-arg constructor         at java.util.ServiceLoader.fail(ServiceLoader.java:586) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:679) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_1297 failed         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:427) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinPreProcessorException: Attach error for mixins.sodiumdynamiclights.json:lightsource.EntityMixin from mod sodiumdynamiclights during activity: [Transform -> Method sodiumdynamiclights$scheduleTrackedChunksRebuild(Lnet/minecraft/class_761;)V -> INVOKESTATIC -> net/minecraft/class_310::method_1551:()Lnet/minecraft/class_310;]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:313) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1292) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:203) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:437) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:418) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: net.minecraft.class_310         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMemberReference(MixinPreProcessorStandard.java:791) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:777) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:743) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:307) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1292) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:203) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:437) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:418) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.ClassNotFoundException: net.minecraft.class_310         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMemberReference(MixinPreProcessorStandard.java:791) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:777) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:743) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:307) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1292) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:203) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:437) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:418) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.