Merge 8e940b7b0c
into ecf829c544
This commit is contained in:
commit
487651df65
|
@ -236,8 +236,9 @@ macro_rules! define_blocks {
|
|||
Block::$name {
|
||||
$($fname,)?
|
||||
} => {
|
||||
$(return String::from($variant);)?
|
||||
"normal".to_owned()
|
||||
$(return String::from($variant);)*
|
||||
//"normal".to_owned()
|
||||
"".to_owned()
|
||||
}
|
||||
)+
|
||||
}
|
||||
|
@ -6142,7 +6143,7 @@ define_blocks! {
|
|||
},
|
||||
data Some(facing.horizontal_index()),
|
||||
offset Some(facing.horizontal_offset()),
|
||||
model { ("minecraft", "silver_glazed_terracotta") },
|
||||
model { ("minecraft", "light_gray_glazed_terracotta") },
|
||||
variant format!("facing={}", facing.as_string()),
|
||||
hardness 1.4,
|
||||
harvest_tools [ Tool::Pickaxe(_), ],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "missing_block" }
|
||||
"": { "model": "missing_block" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,11 +312,23 @@ impl Factory {
|
|||
{
|
||||
Some(val) => val,
|
||||
None => {
|
||||
error!(
|
||||
"Couldn't find model {}",
|
||||
format!("models/block/{}.json", model_name)
|
||||
);
|
||||
return None;
|
||||
// 1.13+ paths remove implicit blocks/
|
||||
// TODO: remove fallback, look for specific asset version?
|
||||
match self
|
||||
.resources
|
||||
.read()
|
||||
.unwrap()
|
||||
.open(plugin, &format!("models/{}.json", model_name))
|
||||
{
|
||||
Some(val) => val,
|
||||
None => {
|
||||
error!(
|
||||
"Couldn't find model models/block/{}.json or models/{}.json",
|
||||
model_name, model_name
|
||||
);
|
||||
return None;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
let block_model: serde_json::Value = try_log!(opt serde_json::from_reader(file));
|
||||
|
|
|
@ -26,11 +26,11 @@ use std_or_web::fs;
|
|||
use crate::types::hash::FNVHash;
|
||||
use crate::ui;
|
||||
|
||||
const RESOURCES_VERSION: &str = "1.12.2";
|
||||
const RESOURCES_VERSION: &str = "1.13.2";
|
||||
const VANILLA_CLIENT_URL: &str =
|
||||
"https://launcher.mojang.com/v1/objects/0f275bc1547d01fa5f56ba34bdc87d981ee12daf/client.jar";
|
||||
const ASSET_VERSION: &str = "1.12";
|
||||
const ASSET_INDEX_URL: &str = "https://launchermeta.mojang.com/mc/assets/1.12/67e29e024e664064c1f04c728604f83c24cbc218/1.12.json";
|
||||
"https://launcher.mojang.com/v1/objects/30bfe37a8db404db11c7edf02cb5165817afb4d9/client.jar";
|
||||
const ASSET_VERSION: &str = "1.13.1";
|
||||
const ASSET_INDEX_URL: &str = "https://launchermeta.mojang.com/mc/assets/1.13.1/1e710e31f3ce2fe262373b8cf5e054ee5955d904/1.13.1.json";
|
||||
|
||||
pub trait Pack: Sync + Send {
|
||||
fn open(&self, name: &str) -> Option<Box<dyn io::Read>>;
|
||||
|
|
Loading…
Reference in New Issue