Skip to content

Commit

Permalink
more work on model fixing
Browse files Browse the repository at this point in the history
also fixes some bugs in animation gui
  • Loading branch information
Thutmose committed Mar 1, 2020
1 parent 7719747 commit 8cea9bc
Show file tree
Hide file tree
Showing 79 changed files with 315 additions and 14,386 deletions.
296 changes: 0 additions & 296 deletions blender_files/gen_6/bergmite.x3d

This file was deleted.

Binary file modified blender_files/gen_6/diancie_mega.blend
Binary file not shown.
File renamed without changes.
Binary file modified blender_files/gen_6/fennekin.blend
Binary file not shown.
323 changes: 0 additions & 323 deletions blender_files/gen_6/inkay.x3d

This file was deleted.

971 changes: 0 additions & 971 deletions blender_files/gen_6/malamar.x3d

This file was deleted.

Binary file modified blender_files/gen_7/celesteela.blend
Binary file not shown.
Binary file modified blender_files/gen_7/fomantis.blend
Binary file not shown.
31 changes: 18 additions & 13 deletions src/main/java/pokecube/core/client/gui/AnimationGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ void onUpdated()
this.toRender.onGenesChanged();
this.dyeColour.setText("" + this.toRender.getDyeColour());
if (this.renderHolder != null) this.renderHolder.overrideAnim = false;

this.renderHolder = RenderPokemob.holders.get(AnimationGui.entry);
if (this.holder != null) this.renderHolder = RenderPokemob.customs.getOrDefault(this.holder.key,
this.renderHolder);

this.renderHolder.overrideAnim = true;
this.renderHolder.anim = ThutCore.trim(this.anim.getText());
PacketPokedex.updateWatchEntry(AnimationGui.entry);
Expand Down Expand Up @@ -318,7 +322,7 @@ protected void init()
super.init();
final int yOffset = this.height / 2;
final int xOffset = this.width / 2;

this.sexe = IPokemob.MALE;
if (GuiPokedex.pokedexEntry != null) AnimationGui.mob = GuiPokedex.pokedexEntry.getName();
AnimationGui.entry = Database.getEntry(AnimationGui.mob);
if (AnimationGui.entry == null) AnimationGui.entry = Pokedex.getInstance().getFirstEntry();
Expand Down Expand Up @@ -349,8 +353,9 @@ protected void init()
else AnimationGui.entry = Pokedex.getInstance().getFirstEntry();
AnimationGui.mob = AnimationGui.entry.getForGender(this.sexe).getName();
this.forme.setText(AnimationGui.mob);
this.holder = null;
this.forme_alt.setText("");
this.holder = AnimationGui.entry.getModel(this.sexe);
this.forme_alt.setText(this.holder == null ? "" : this.holder.key.toString());
System.out.println(AnimationGui.entry + " " + this.holder + " " + this.sexe);
PacketPokedex.updateWatchEntry(AnimationGui.entry);
this.onUpdated();
}));
Expand All @@ -361,8 +366,8 @@ protected void init()
else AnimationGui.entry = Pokedex.getInstance().getLastEntry();
AnimationGui.mob = AnimationGui.entry.getForGender(this.sexe).getName();
this.forme.setText(AnimationGui.mob);
this.holder = null;
this.forme_alt.setText("");
this.holder = AnimationGui.entry.getModel(this.sexe);
this.forme_alt.setText(this.holder == null ? "" : this.holder.key.toString());
PacketPokedex.updateWatchEntry(AnimationGui.entry);
this.onUpdated();
}));
Expand Down Expand Up @@ -449,8 +454,8 @@ else if (gender[1].equalsIgnoreCase("m"))
{
AnimationGui.entry = i + 1 < formes.size() ? formes.get(i + 1) : formes.get(0);
AnimationGui.mob = AnimationGui.entry.getName();
this.holder = null;
this.forme_alt.setText("");
this.holder = AnimationGui.entry.getModel(this.sexe);
this.forme_alt.setText(this.holder == null ? "" : this.holder.key.toString());
this.forme.setText(AnimationGui.mob);
break;
}
Expand All @@ -470,8 +475,8 @@ else if (gender[1].equalsIgnoreCase("m"))
{
AnimationGui.entry = i - 1 >= 0 ? formes.get(i - 1) : formes.get(formes.size() - 1);
AnimationGui.mob = AnimationGui.entry.getName();
this.holder = null;
this.forme_alt.setText("");
this.holder = AnimationGui.entry.getModel(this.sexe);
this.forme_alt.setText(this.holder == null ? "" : this.holder.key.toString());
this.forme.setText(AnimationGui.mob);
break;
}
Expand Down Expand Up @@ -549,8 +554,8 @@ public boolean keyPressed(final int code, final int unk1, final int unk2)
AnimationGui.mob = AnimationGui.entry.getForGender(this.sexe).getName();
this.forme.setText(AnimationGui.mob);
PacketPokedex.updateWatchEntry(AnimationGui.entry);
this.holder = null;
this.forme_alt.setText("");
this.holder = AnimationGui.entry.getModel(this.sexe);
this.forme_alt.setText(this.holder == null ? "" : this.holder.key.toString());
this.onUpdated();
}
if (code == GLFW.GLFW_KEY_LEFT)
Expand All @@ -561,8 +566,8 @@ public boolean keyPressed(final int code, final int unk1, final int unk2)
AnimationGui.mob = AnimationGui.entry.getForGender(this.sexe).getName();
PacketPokedex.updateWatchEntry(AnimationGui.entry);
this.forme.setText(AnimationGui.mob);
this.holder = null;
this.forme_alt.setText("");
this.holder = AnimationGui.entry.getModel(this.sexe);
this.forme_alt.setText(this.holder == null ? "" : this.holder.key.toString());
this.onUpdated();
}
return super.keyPressed(code, unk1, unk2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public static void reloadModel(final PokedexEntry entry)
if (custom.entry == entry) custom.init();
}

static final Map<ResourceLocation, Holder> customs = Maps.newHashMap();
public static final Map<ResourceLocation, Holder> customs = Maps.newHashMap();

public static Map<PokemobType<?>, Holder> holderMap = Maps.newHashMap();
public static Map<PokedexEntry, Holder> holders = Maps.newHashMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public Mesh(final Integer[] order, final Vertex[] vert, final Vertex[] norm, fin
this.normalList[i] = c;
this.normalList[i + 1] = c;
this.normalList[i + 2] = c;
if (iter == 4) this.normalList[i + 3] = c;
}
// broken, lets just fill with z+
else
Expand Down

This file was deleted.

Loading

0 comments on commit 8cea9bc

Please sign in to comment.